]> Cypherpunks repositories - gostls13.git/commit
cmd/link: support loading R_LARCH_PCREL20_S2 and R_LARCH_CALL36 relocs
authorWANG Xuerui <git@xen0n.name>
Mon, 6 Oct 2025 10:09:14 +0000 (18:09 +0800)
committerabner chenc <chenguoqi@loongson.cn>
Fri, 21 Nov 2025 03:04:50 +0000 (19:04 -0800)
commit4b0e3cc1d63a00ee184ea1f6b17e79808e3d9fdc
treea39935c924fff622dc112d627030d86a5cc1fb1a
parentcdba82c7d6fce54b212872ae45d04c3911b11014
cmd/link: support loading R_LARCH_PCREL20_S2 and R_LARCH_CALL36 relocs

Host libgcc.a (among other libraries) on loong64 systems may contain
such relocs if built with the "medium" code model and/or linker
relaxation, which is increasingly the case. Make the internal linker
aware of these for cgo interopability going forward.

While at it, fix some of the comments for the loong64-specific
RelocTypes.

Fixes #75562

Change-Id: I0810969dcd229c5131ef06b0f70f51d81a3be4cd
Reviewed-on: https://go-review.googlesource.com/c/go/+/709717
Reviewed-by: abner chenc <chenguoqi@loongson.cn>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Mark Freeman <markfreeman@google.com>
Reviewed-by: Meidan Li <limeidan@loongson.cn>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
src/cmd/internal/obj/fips140.go
src/cmd/internal/objabi/reloctype.go
src/cmd/internal/objabi/reloctype_string.go
src/cmd/link/internal/loadelf/ldelf.go
src/cmd/link/internal/loong64/asm.go