1
0
mirror of https://github.com/golang/go synced 2024-11-14 09:00:21 -07:00
go/src/cmd/link
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
..
internal cmd/link: handle R_GOTPCREL separately on darwin 2016-11-16 18:37:03 +00:00
doc.go cmd/link, plugin: use full plugin path for symbols 2016-10-31 04:48:42 +00:00
link_test.go cmd/link: handle long symbol names 2016-04-13 20:31:43 +00:00
linkbig_test.go cmd/link: trampoline support for external linking on ARM 2016-10-17 21:38:06 +00:00
main.go cmd/dist: add support for GOARCH=mips{,le} 2016-11-12 00:34:21 +00:00