1
0
mirror of https://github.com/golang/go synced 2024-11-17 11:14:46 -07:00
go/misc/cgo
David Crawshaw 7ee7936523 cmd/link: handle R_GOTPCREL separately on darwin
To generate the correct section offset the shared code path for
R_CALL, R_PCREL, and R_GOTPCREL on darwin when externally linking
walks up the symbol heirarchy adding the differences. This is fine,
except in the case where we are generating a GOT lookup, because
the topmost symbol is left in r.Xsym instead of the symbol we are
looking up. So all funcsym GOT lookups were looking up the outer
"go.func.*" symbol.

Fix this by separating out the R_GOTPCREL code path.

For #17828 (and may fix it).

Change-Id: I2c9f4d135e77c17270aa064d8c876dc6d485d659
Reviewed-on: https://go-review.googlesource.com/33211
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-11-16 18:37:03 +00:00
..
errors cmd/cgo: run cgo pointer checks for pointer to union 2016-11-15 17:10:52 +00:00
fortran misc/cgo/fortran: fix gfortran compile test 2016-05-04 15:08:16 +00:00
gmp all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
life all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
nocgo
stdio all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
test cmd/cgo: don't ignore qualifiers, don't cast to void* 2016-11-11 01:31:12 +00:00
testasan
testcarchive misc/cgo/testcarchive, misc/cgo/testcshared: sleep instead of sched_yield 2016-11-15 05:35:54 +00:00
testcshared misc/cgo/testcarchive, misc/cgo/testcshared: sleep instead of sched_yield 2016-11-15 05:35:54 +00:00
testgodefs cmd/cgo: add -srcdir option 2016-10-30 19:14:08 +00:00
testplugin cmd/link: handle R_GOTPCREL separately on darwin 2016-11-16 18:37:03 +00:00
testsanitizers runtime/cgo: use libc for sigaction syscalls when possible 2016-11-16 05:38:38 +00:00
testshared cmd/compile, runtime: make the go.itab.* symbols module-local 2016-10-27 19:13:35 +00:00
testsigfwd misc/cgo/testsigfwd: add missing return statement 2016-08-30 21:44:14 +00:00
testso cmd/dist: convert testso test into Go 2015-06-12 04:33:50 +00:00
testsovar misc/cgo/testsovar: needs the extern keyword to export variables on non-windows platforms 2015-07-21 18:10:57 +00:00
testtls all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00