]> Cypherpunks.ru repositories - gostls13.git/commit
debug/elf,cmd/link: add additional relocations for loong64
authorGuoqi Chen <chenguoqi@loongson.cn>
Tue, 24 Oct 2023 08:24:39 +0000 (16:24 +0800)
committerCherry Mui <cherryyz@google.com>
Thu, 2 Nov 2023 19:46:03 +0000 (19:46 +0000)
commit39d3c4ad35984b470b2928a37ea4a7e721b1225a
tree9b517ba798f8b80e14251d2a8948f7407d9ff58c
parent925a4d93dcc958ee9250bcc213baa0fc7bd892ae
debug/elf,cmd/link: add additional relocations for loong64

The Linker Relaxation feature on Loong64 is already supported in binutils 2.41.
The intermediate code generated after enabling this feature introduces three
reloc types R_LARCH_B26, R_LARCH_ADD32 and R_LARCH_SUB32.

The other relocation types are not currently used when running all.bash, but
in order to avoid the host tool chain making the decision to use it we don't
have to catch it every time.

The LoongArch ABI at here:
https://github.com/loongson/la-abi-specs/blob/release/la-abi.adoc

Corresponding binutils implementation:
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=be1ebb6710a8f707bd4b0eecbd00f4f4964050e5
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=1b6fccd28db14fffe75ff6755307047ef932c81e

Fixes #63725

Change-Id: I891115cfdbcf785ab494c881d5f9d1bf8748da8b
Reviewed-on: https://go-review.googlesource.com/c/go/+/537615
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Meidan Li <limeidan@loongson.cn>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
api/next/63725.txt [new file with mode: 0644]
src/cmd/link/internal/loadelf/ldelf.go
src/debug/elf/elf.go