]> Cypherpunks repositories - gostls13.git/commit
cmd/link: call moduledata symbols "local.moduledata" if they are created by the linker
authorMichael Hudson-Doyle <michael.hudson@canonical.com>
Wed, 19 Aug 2015 01:34:33 +0000 (13:34 +1200)
committerIan Lance Taylor <iant@golang.org>
Tue, 25 Aug 2015 23:48:12 +0000 (23:48 +0000)
commit7f9e443d9c663d41b193fa9e1f3368335b999eff
tree65451097837297e6a3f4b036532a709920e04265
parent6ec1809b8372028e0bf1f87b15cddf06a6dbc8af
cmd/link: call moduledata symbols "local.moduledata" if they are created by the linker

This was always a bit confusing, but it also fixes a problem: runtime.firstmoduledata
was always overridden in the linker to be a local symbol but cmd/internal/obj had
already rewritten code accessing it to access it via the GOT. This works on amd64, but
causes link failures on other platforms (e.g. arm64).

Change-Id: I9b8153af74b4d0f092211d63a000d15818f39773
Reviewed-on: https://go-review.googlesource.com/13786
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/link/internal/amd64/asm.go
src/cmd/link/internal/ld/lib.go
src/cmd/link/internal/ld/link.go
src/cmd/link/internal/ld/symtab.go