]> Cypherpunks repositories - gostls13.git/commit
cmd/link/internal/ld: remove R_ADDR relocations inside XCOFF text sections
authorClément Chigot <clement.chigot@atos.net>
Fri, 2 Nov 2018 12:50:59 +0000 (13:50 +0100)
committerIan Lance Taylor <iant@golang.org>
Mon, 26 Nov 2018 23:37:00 +0000 (23:37 +0000)
commit63ac89bfb15b2036741e40b2167d1d2f70af3e40
treef409a80f7e88eb000507e26864ead83e8203f28e
parent6fff980cf1f9af9f4b11e7fc7ead4987cc5fc560
cmd/link/internal/ld: remove R_ADDR relocations inside XCOFF text sections

On XCOFF, it is forbidden relocation of a DATA pointer to a text
section. It happens when a RODATA symbol needs a DATA symbol's address.
This commit moves every RODATA symbols with a R_ADDR on a data symbol to
.data sections to avoid these relocations.

Change-Id: I7f34d8e0ebdc8352a74e6b40e4c893d8d9419f4d
Reviewed-on: https://go-review.googlesource.com/c/146977
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/link/internal/ld/data.go
src/cmd/link/internal/ld/xcoff.go
src/runtime/alg.go