[all-commits] [llvm/llvm-project] 80a6bc: [lld][LoongArch] Check that the relocation addend ...
Zhaoxin Yang via All-commits
all-commits at lists.llvm.org
Fri Aug 1 00:12:43 PDT 2025
Branch: refs/heads/release/21.x
Home: https://github.com/llvm/llvm-project
Commit: 80a6bc76cf43bbd7bcb940f02ac2ea6b8922a6b4
https://github.com/llvm/llvm-project/commit/80a6bc76cf43bbd7bcb940f02ac2ea6b8922a6b4
Author: Zhaoxin Yang <yangzhaoxin at loongson.cn>
Date: 2025-08-01 (Fri, 01 Aug 2025)
Changed paths:
M lld/ELF/Arch/LoongArch.cpp
M lld/test/ELF/loongarch-relax-pc-hi20-lo12.s
Log Message:
-----------
[lld][LoongArch] Check that the relocation addend is zero before applying relaxation to R_LARCH_GOT_PC_{HI20,LO12} (#151264)
Linker relaxation to R_LARCH_GOT_PC_{HI20,LO12} is only possible when
the addend of the relocation is zero.
Note: For `ld.bfd`, GOT references with non-zero addends will trigger an
assert in LoongArch, but `lld` handles these cases without any errors.
```
ld.bfd: BFD (GNU Binutils) 2.44.0 assertion fail
/usr/src/debug/binutils/binutils-gdb/bfd/elfnn-loongarch.c:4248
```
(cherry picked from commit 4ec8503e4c480f52426ddd03619b017f19a2f452)
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list