[lld] r263228 - Simplify now that local symbols can use getVA.
Simon Atanasyan via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 14 22:32:14 PDT 2016
On Tue, Mar 15, 2016 at 12:32 AM, Rafael Espíndola
<rafael.espindola at gmail.com> wrote:
> On 11 March 2016 at 20:52, Simon Atanasyan <simon at atanasyan.com> wrote:
>> On Fri, Mar 11, 2016 at 5:24 PM, Rafael Espíndola
>> <rafael.espindola at gmail.com> wrote:
>>> On 11 March 2016 at 08:54, Simon Atanasyan <simon at atanasyan.com> wrote:
>>>> On Fri, Mar 11, 2016 at 4:04 PM, Rafael Espindola via llvm-commits
>>>> <llvm-commits at lists.llvm.org> wrote:
>>>>> It is really odd that Mips differentiates symbols that are born local
>>>>> and those that become local because of hidden visibility. I don't know
>>>>> enough mips to known if this is a bug or not.
>>>> Do you mean the fact that "true" local symbols got one kind of GOT
>>>> entries with "page" address while symbols with hidden visibility got
>>>> another kind of GOT entries with full address?
>>>> If so it is not a bug, just an ABI requirement.
>>> Sigh. Why is the ABI defined like that? If the symbol is hidden the
>>> compiler knows it will be local in the DSO and should be able to use
>>> the same code sequence as for local symbols.
>> When compiler makes PIC object file with a reference to public symbol
>> 'foo' it does not know where this object file be linked to: executable
>> or DSO.
> Not sure I follow. If the symbol is hidden the linker is required to
> turn it into local, so the compiler knows that it will be in the same
> DSO. The same thing it knows with local symbols.
> The quote from the ELF spec is: "A hidden symbol contained in a
> relocatable object must be either removed or converted to STB_LOCAL
> binding by the link-editor when the relocatable object is included in
> an executable file or shared object."
Probably we are both right but talking about different things. Could
you remember me the case when MIPS differentiates symbols that are
born local and those that become local because of hidden visibility? I
thought you mean the case when public symbol behaves like a local one
from GOT point of view.
More information about the llvm-commits