This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: ld violating ELF specification for hidden symbols?
- From: Cary Coutant <ccoutant at google dot com>
- To: Jan Beulich <JBeulich at novell dot com>
- Cc: binutils at sourceware dot org
- Date: Fri, 7 Jan 2011 13:49:37 -0800
- Subject: Re: ld violating ELF specification for hidden symbols?
- References: <4D272F64020000780002B038@vpn.id2.novell.com>
> 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
think you'll find that the hidden symbol is not present in the dynamic
symbol table, or has been marked STB_LOCAL.
-cary