aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/alg.go
diff options
context:
space:
mode:
authorClément Chigot <clement.chigot@atos.net>2018-11-02 13:50:59 +0100
committerIan Lance Taylor <iant@golang.org>2018-11-26 23:37:00 +0000
commit63ac89bfb15b2036741e40b2167d1d2f70af3e40 (patch)
treef409a80f7e88eb000507e26864ead83e8203f28e /src/runtime/alg.go
parent6fff980cf1f9af9f4b11e7fc7ead4987cc5fc560 (diff)
downloadgo-63ac89bfb15b2036741e40b2167d1d2f70af3e40.tar.gz
go-63ac89bfb15b2036741e40b2167d1d2f70af3e40.zip
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>
Diffstat (limited to 'src/runtime/alg.go')
-rw-r--r--src/runtime/alg.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/runtime/alg.go b/src/runtime/alg.go
index 8e931fd765..887dbebdeb 100644
--- a/src/runtime/alg.go
+++ b/src/runtime/alg.go
@@ -301,6 +301,10 @@ func alginit() {
}
func initAlgAES() {
+ if GOOS == "aix" {
+ // runtime.algarray is immutable on AIX: see cmd/link/internal/ld/xcoff.go
+ return
+ }
useAeshash = true
algarray[alg_MEM32].hash = aeshash32
algarray[alg_MEM64].hash = aeshash64