[go] debug/elf: sync new LoongArch relocation types up to ELF psABI v20250521

0 views
Skip to first unread message

abner chenc (Gerrit)

unread,
Nov 17, 2025, 8:00:52 PM (4 days ago) Nov 17
to goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Junyang Shao, Mark Freeman, sophie zhao, Meidan Li, Go LUCI, Cherry Mui, Qiqi Huang, Ian Lance Taylor, Gopher Robot, golang-co...@googlegroups.com

abner chenc submitted the change

Change information

Commit message:
debug/elf: sync new loong64 relocation types up to LoongArch ELF psABI v20250521

Add several new relocation types defined in newer versions of LoongArch
ELF psABI v20250521, part of the v2.40 spec bundle. The new relocations
are seeing increased adoption because distributions are moving to newer
GNU/LLVM toolchain versions, so Go's internal linker must be prepared to
handle some of them, especially R_LARCH_CALL36 because the ecosystem is
slowly migrating to the "medium" code model by default.

The constants R_LARCH_DELETE and R_LARCH_CFA were removed in LoongArch
ELF psABI v20231102 (spec bundle v2.20), but they are already part of
the public API, so they are retained for now for upholding the go1
compatibility guarantee.

Corresponding binutils implementation:

* R_LARCH_CALL36: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=dc5f359ed6a36d2c895d89c3e4886f3a2b6d9232
* TLSDESC: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=26265e7fdf19d461563388495b6799eb3719f80a
* TLS {LD,GD,DESC} relaxation: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ae296cc45258b95223210263d1b91115e84beb56
* TLS LE relaxation: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=775dead218e12e3fb94481c7a99aa0238d6a9138

Updates #75562
Change-Id: Ib023e0b6becc0862d27afc419d3eb84c737359db
Reviewed-by: Mark Freeman <markf...@google.com>
Reviewed-by: Meidan Li <lime...@loongson.cn>
Reviewed-by: abner chenc <chen...@loongson.cn>
Reviewed-by: Junyang Shao <shaoj...@google.com>
Reviewed-by: sophie zhao <zhaox...@loongson.cn>
Files:
  • A api/next/75562.txt
  • A doc/next/6-stdlib/99-minor/debug/elf/75562.md
  • M src/debug/elf/elf.go
  • M src/debug/elf/elf_test.go
Change size: M
Delta: 4 files changed, 81 insertions(+), 0 deletions(-)
Branch: refs/heads/master
Submit Requirements:
  • requirement satisfiedCode-Review: +2 by abner chenc, +1 by Junyang Shao, +1 by Mark Freeman, +1 by sophie zhao, +1 by Meidan Li
  • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: Ib023e0b6becc0862d27afc419d3eb84c737359db
Gerrit-Change-Number: 709716
Gerrit-PatchSet: 9
Gerrit-Owner: WANG Xuerui <g...@xen0n.name>
Gerrit-Reviewer: Cherry Mui <cher...@google.com>
Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
Gerrit-Reviewer: Junyang Shao <shaoj...@google.com>
Gerrit-Reviewer: Mark Freeman <markf...@google.com>
Gerrit-Reviewer: Meidan Li <lime...@loongson.cn>
Gerrit-Reviewer: Qiqi Huang <huan...@loongson.cn>
Gerrit-Reviewer: WANG Xuerui <g...@xen0n.name>
Gerrit-Reviewer: abner chenc <chen...@loongson.cn>
Gerrit-Reviewer: sophie zhao <zhaox...@loongson.cn>
Gerrit-CC: Gopher Robot <go...@golang.org>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages