This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ld violating ELF specification for hidden symbols?


>>> On 10.01.11 at 10:54, Mike Frysinger <vapier@gentoo.org> wrote:
> On Mon, Jan 10, 2011 at 3:08 AM, Jan Beulich wrote:
>>>>> On 07.01.11 at 22:49, Cary Coutant wrote:
>>>>  The version of the spec I have says "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." Nevertheless I see
>>>> global hidden symbols in executables. Did the spec get changed
>>>> (and if so, when/where), or is this a bug?
>>>
>>> It's not clear in the gABI, but it really only matters for the dynamic
>>> symbol table. Once an executable or shared library is built, the
>>> static symbol table isn't involved in further symbol binding
>>> operations, and the symbols listed there are for reference only. I
>>
>> Ah, yes, indeed. Having looked at a couple of arbitrarily chosen
>> binaries that I know got linked with no special options, this only
>> opens up the question of what determines whether a symbol
>> makes it into .dynsym (I would have expected all of them to be
>> there without telling the linker otherwise).
> 
> you mean --[no-]export-dynamic ?

Perhaps. The question is whether this can be defaulted to by
one of the scripts the linker uses without being told specifically...

Jan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]