diff options
author | Zhaoxin Yang <yangzhaoxin@loongson.cn> | 2025-07-30 16:40:59 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-07-30 16:40:59 +0800 |
commit | 4ec8503e4c480f52426ddd03619b017f19a2f452 (patch) | |
tree | 4f67246d1a4546b2712dbb47749ce80e92a1e376 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 743177c1ef1e0e43584854191f8a11b22b85e951 (diff) | |
download | llvm-4ec8503e4c480f52426ddd03619b017f19a2f452.zip llvm-4ec8503e4c480f52426ddd03619b017f19a2f452.tar.gz llvm-4ec8503e4c480f52426ddd03619b017f19a2f452.tar.bz2 |
[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
```
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions