Summary: | ld fails to convert global hidden symbols to local ones | ||
---|---|---|---|
Product: | binutils | Reporter: | Jan Beulich <jbeulich> |
Component: | ld | Assignee: | unassigned |
Status: | RESOLVED INVALID | ||
Severity: | normal | CC: | amodra |
Priority: | P2 | ||
Version: | 2.21 | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: | ||
Attachments: | trivial example |
I think this is really just a weakness in the gabi spec. The symbol table that matters for correct implementation of hidden symbols is the dynamic symbol table. GNU ld does remove hidden symbols from .dynsym. Indeed, as was clarified on the mailing list. |
Created attachment 5183 [details] trivial example 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. Attaching a trivial sample, to be run through as -o hidden.o hidden.s ld -o hidden hidden.o objdump -t hidden