cmd/link, runtime: allow external linking for aix/ppc64

This commit adds external linking in cmd/link for aix/ppc64.
As relocations on .text data aren't possible on AIX, Segrelrodata is
used to move all these datas to .data section.

Change-Id: I4d1361c1fc9290e11e6f5560864460c76551dbeb
Reviewed-on: https://go-review.googlesource.com/c/go/+/164003
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Clément Chigot 2019-02-20 16:16:38 +01:00 committed by Ian Lance Taylor
parent 0ff0df8be3
commit 80f10965ee
9 changed files with 297 additions and 24 deletions

View file

@ -1683,6 +1683,7 @@ func dwarfEnabled(ctxt *Link) bool {
}
if ctxt.LinkMode == LinkExternal {
// TODO(aix): enable DWARF
switch {
case ctxt.IsELF:
case ctxt.HeadType == objabi.Hdarwin: