mirror of
https://github.com/golang/go
synced 2024-09-29 15:34:30 -06:00
cmd/link: use correct path for dynamic loader on ppc64le
The setting of the path for the dynamic loader when building for linux/ppc64le ELF v2 was incorrectly set to the path for PPC64 ELF v1. This has not caused issues in the common cases because this string can be set based on the default GO_LDSO setting. It does result in an incorrect value when cross compiling binaries with -buildmode=pie. Updates #53813 Change-Id: I84de1c97b42e0434760b76a57c5a05e055fbb730 Reviewed-on: https://go-review.googlesource.com/c/go/+/417614 Reviewed-by: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Michael Knyszek <mknyszek@google.com> Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com>
This commit is contained in:
parent
91d5ce3def
commit
15d395a196
@ -38,9 +38,12 @@ import (
|
||||
)
|
||||
|
||||
func Init() (*sys.Arch, ld.Arch) {
|
||||
arch := sys.ArchPPC64
|
||||
if buildcfg.GOARCH == "ppc64le" {
|
||||
arch = sys.ArchPPC64LE
|
||||
arch := sys.ArchPPC64LE
|
||||
dynld := "/lib64/ld64.so.2"
|
||||
|
||||
if buildcfg.GOARCH == "ppc64" {
|
||||
arch = sys.ArchPPC64
|
||||
dynld = "/lib64/ld64.so.1"
|
||||
}
|
||||
|
||||
theArch := ld.Arch{
|
||||
@ -64,9 +67,7 @@ func Init() (*sys.Arch, ld.Arch) {
|
||||
Machoreloc1: machoreloc1,
|
||||
Xcoffreloc1: xcoffreloc1,
|
||||
|
||||
// TODO(austin): ABI v1 uses /usr/lib/ld.so.1,
|
||||
Linuxdynld: "/lib64/ld64.so.1",
|
||||
|
||||
Linuxdynld: dynld,
|
||||
Freebsddynld: "XXX",
|
||||
Openbsddynld: "XXX",
|
||||
Netbsddynld: "XXX",
|
||||
|
Loading…
Reference in New Issue
Block a user