A hidden symbol gets placed in the dynamic symbol table (as local) if referenced from a shared library. The right behavior should be to issue an error.
$ cat foo.c int foo() __attribute((visibility("hidden"))); int foo () { return 42; } int main() { return foo(); } $ cat bar.c int bar() { return foo(); } Linking with gnu ld: ld: a.out: hidden symbol `foo' in /tmp/cc8PyfIO.o is referenced by DSO Linking with gold before http://sourceware.org/ml/binutils/2009-02/msg00367.html: nm -D a.out | grep foo 000000000040035c T foo Linking with gold after http://sourceware.org/ml/binutils/2009-02/msg00367.html: nm -D a.out | grep foo 000000000040038c t foo -- Summary: hidden symbol gets added to dynamic symbol table Product: binutils Version: 2.18 Status: NEW Severity: normal Priority: P2 Component: gold AssignedTo: ian at airs dot com ReportedBy: silvius dot rus at gmail dot com CC: bug-binutils at gnu dot org,ccoutant at google dot com,ppluzhnikov at google dot com GCC build triplet: x86_64-unknown-linux GCC host triplet: x86_64-unknown-linux GCC target triplet: x86_64-unknown-linux http://sourceware.org/bugzilla/show_bug.cgi?id=10471 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils