bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/18725] main: hidden symbol `foo' isn't defined


From: hjl.tools at gmail dot com
Subject: [Bug ld/18725] main: hidden symbol `foo' isn't defined
Date: Mon, 27 Jul 2015 20:04:46 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=18725

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |WONTFIX

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> ---
This behavior is expected.  When linker first checks foo.o in
libbar.a, foo is defined in libfoo.so.  Linker decides not to pull
in foo.o.  Then linker pulls in xxx.o in libbar.a to resolve
reference to xxx, which leads to bar.o in libbar.a pulled in
for bar.o and results in turning foo into hidden.  Linker won't
rescan libbar.a for foo.  You should use

# gcc -o main main.o libbar.a libfoo.so libbar.a -Wl,-R.

-- 
You are receiving this mail because:
You are on the CC list for the bug.



reply via email to

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