]> Cypherpunks repositories - gostls13.git/commit
cmd/link: allow symbols from .a files to override those from .so files
authorMichael Hudson-Doyle <michael.hudson@canonical.com>
Wed, 20 Jan 2016 02:31:26 +0000 (15:31 +1300)
committerMichael Hudson-Doyle <michael.hudson@canonical.com>
Wed, 20 Jan 2016 19:53:53 +0000 (19:53 +0000)
commitcd9fc3ebfbdb129570317b3a2537975851370c7a
tree00274618bfaba376f1443d777e6ef4e4c28c2388
parent97266969d8f9b0b2fd6c37121a3f0d52872efced
cmd/link: allow symbols from .a files to override those from .so files

https://golang.org/s/execmodes defines rules for how multiple codes of a go
package work when they end up in the address space of a single process, but
currently the linker blows up in this situation. Fix that by loading all .a
files before any .so files and ignoring duplicate symbols found when loading
shared libraries.

I know this is very very late for 1.6 but at least it should clearly not have
any effect when shared libraries are not in use.

Change-Id: I512ac912937e7502ff58eb5628b658ecce3c38e5
Reviewed-on: https://go-review.googlesource.com/18714
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
misc/cgo/testshared/shared_test.go
misc/cgo/testshared/src/explicit/explicit.go [new file with mode: 0644]
misc/cgo/testshared/src/implicit/implicit.go [new file with mode: 0644]
misc/cgo/testshared/src/implicitcmd/implicitcmd.go [new file with mode: 0644]
src/cmd/link/internal/ld/lib.go