bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gold/10471] hidden symbol gets added to dynamic symbol table


From: ccoutant at google dot com
Subject: [Bug gold/10471] hidden symbol gets added to dynamic symbol table
Date: 7 Aug 2009 22:56:11 -0000

------- 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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]