diff options
author | Paul E. Murphy <murp@ibm.com> | 2023-05-04 13:14:52 -0500 |
---|---|---|
committer | Paul Murphy <murp@ibm.com> | 2023-05-09 13:46:03 +0000 |
commit | f3034bed728551eb3f5e1ce8d8f1e54829909a45 (patch) | |
tree | 973217bae00ec29dfa867d8dc87e0d1cd1aa07b0 /src/cmd/link | |
parent | d8ab19b2f2d754e374af7fc643dac5224667310b (diff) | |
download | go-git-f3034bed728551eb3f5e1ce8d8f1e54829909a45.tar.gz |
cmd/link/internal/ppc64: fix export of R_DWARFSECREF to ELF on ppc64
Today, external linking is not supported on any ppc64 ELF target, but
soon openbsd will be enabled with external linking support.
This relocation does not require additional endian specific fixups
like most other PPC64 Go relocation types.
I discovered this during an experiment to support external linking
on ppc64/linux.
Change-Id: I0b12b6172c7ba08df1c8cf024b4aa5e7ee76d0c4
Reviewed-on: https://go-review.googlesource.com/c/go/+/492618
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Paul Murphy <murp@ibm.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Diffstat (limited to 'src/cmd/link')
-rw-r--r-- | src/cmd/link/internal/ppc64/asm.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/link/internal/ppc64/asm.go b/src/cmd/link/internal/ppc64/asm.go index b77ee500fc..d14e9322cf 100644 --- a/src/cmd/link/internal/ppc64/asm.go +++ b/src/cmd/link/internal/ppc64/asm.go @@ -729,7 +729,7 @@ func xcoffreloc1(arch *sys.Arch, out *ld.OutBuf, ldr *loader.Loader, s loader.Sy func elfreloc1(ctxt *ld.Link, out *ld.OutBuf, ldr *loader.Loader, s loader.Sym, r loader.ExtReloc, ri int, sectoff int64) bool { // Beware that bit0~bit15 start from the third byte of an instruction in Big-Endian machines. rt := r.Type - if rt == objabi.R_ADDR || rt == objabi.R_POWER_TLS || rt == objabi.R_CALLPOWER { + if rt == objabi.R_ADDR || rt == objabi.R_POWER_TLS || rt == objabi.R_CALLPOWER || rt == objabi.R_DWARFSECREF { } else { if ctxt.Arch.ByteOrder == binary.BigEndian { sectoff += 2 |