The file null.cpp is empty. Using GNU ld (GNU Binutils for Ubuntu) 2.19.1:
$ g++ -shared null.cpp -o null.so && nm null.so | grep __dso_handle
0000000000201008 d __dso_handle
Note that __dso_handle is an internal symbol.
Using GNU gold (GNU Binutils 2.19.51.20090211) 1.9:
$ g++ -shared null.cpp -o null.so && nm null.so | grep __dso_handle
0000000000002000 D __dso_handle
Note that __dso_handle is an external symbol.
This testcase is reduced from the LLVM compiler which fails to
build when linked with gold and configured with --enable-pic,
because it thinks there are circular library dependencies. The
reason for that is that in the shared libraries a bunch of symbols
are external when linked with gold but internal with the usual ld.
These symbols confuse the script that checks for circular dependencies.
--
Summary: wrong visibility in shared objects
Product: binutils
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: gold
AssignedTo: ian at airs dot com
ReportedBy: baldrick at free dot fr
CC: bug-binutils at gnu dot org
http://sourceware.org/bugzilla/show_bug.cgi?id=9836
------- 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
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-binutils