------- Additional Comments From ccoutant at google dot com 2009-08-07 22:56 ------- Created an attachment (id=4123) --> (http://sourceware.org/bugzilla/attachment.cgi?id=4123&action=view) Proposed patch
The attached patch is a proposed fix for PR 10471, where gold ends up putting a local symbol in the dynamic symbol table when a DSO tries to reference a hidden (or internal) symbol. In this patch, I issue a warning and refuse to resolve the symbol, but the link completes successfully. For the included test case, we get these warning messages: gcctestdir/ld: warning: hidden symbol 'main_hidden' in hidden_test_main.o is referenced by DSO libhidden.so gcctestdir/ld: warning: internal symbol 'main_internal' in hidden_test_main.o is referenced by DSO libhidden.so I'm not sure whether these should be made errors (along with undefined symbol errors, we'd want to see them all before terminating the link) or not. For comparison, gnu ld prints a message (not sure whether it's a warning or an error) about the first such symbol, then terminates with a mysterious error message: /usr/bin/ld: a.out: internal symbol `main_internal' in hidden_test_main.o is referenced by DSO /usr/bin/ld: final link failed: Nonrepresentable section on output -- What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|ian at airs dot com |ccoutant at google dot com Status|NEW |ASSIGNED 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