go/misc
Michael Hudson-Doyle bcc1870fcf cmd/internal/ld: store the libraries a shared library was linked against in a note
The motivation for this is the innocuous looking test case that is added. This
creates a stack exe -> libdep2.so -> libdep.so -> libruntime.so. The problem
comes from the fact that a function from libdep.so gets inlined all the way
into exe. This (unsurprisingly) means that the object file for exe references
symbols from libdep.so, which means that -ldep needs to be passed when linking
exe and it isn't. The fix is simply to pass it -- there is no harm in passing
it when it's not needed.

The thing is, it's not clear at all in the current code to see how the linker
can know that libdep2 is linked against libdep. It could look through the
DT_NEEDED entries in libdep2 and try to guess which are Go libraries, but it
feels better to be explicit. So this adds another SHT_NOTE section that lists
the shared libraries a shared library was linked against, and makes sure the
complete set of depended upon shared libraries is passed to the external
linker.

Change-Id: I79aa6f98b4db4721d657a7eb7b7f062269bf49e2
Reviewed-on: https://go-review.googlesource.com/10376
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2015-05-27 13:25:32 +00:00
..
android misc/android: cleaner to remove stale GOROOT files 2015-05-25 20:52:10 +00:00
arm arm: add gdb support to android launcher script 2010-07-30 10:35:07 +03:00
cgo cmd/internal/ld: store the libraries a shared library was linked against in a note 2015-05-27 13:25:32 +00:00
chrome/gophertool misc/chrome/gophertool: update for the git/gerrit transition 2014-12-18 07:34:46 +00:00
git misc/git: add gofmt git pre-commit hook 2012-11-15 19:58:49 +01:00
ios misc/ios: fix plist indentation and whitespace 2015-05-05 21:04:05 +00:00
linkcheck misc/linkcheck: better redirect handling, use meaningful exit code 2013-10-25 17:31:02 +03:00
makerelease misc/makerelease: send file size when uploading 2015-01-20 04:09:23 +00:00
nacl cmd/link: move to cmd/newlink 2015-05-21 17:31:40 +00:00
swig misc/swig/callback: fix test for SWIG -cgo support 2015-03-06 15:28:50 +00:00
trace misc/trace: add license for the trace-viewer 2015-05-11 06:09:10 +00:00
benchcmp all: use golang.org/x/... import paths 2014-11-10 09:15:57 +11:00
editors all: don't refer to code.google.com/p/go{,-wiki}/ 2015-02-06 14:41:47 +00:00