aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/AST/ByteCode/Compiler.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2025-04-15 23:55:49 -0700
committerFangrui Song <i@maskray.me>2025-04-15 23:55:49 -0700
commitac4712482e3ff886eee7c044dd33dd4b5d648036 (patch)
tree6062a009f0047a285b28806fdbc47a026aff057f /clang/lib/AST/ByteCode/Compiler.cpp
parent52e3f3d68cbabf81c4c118cfb823828f03b712c4 (diff)
downloadllvm-ac4712482e3ff886eee7c044dd33dd4b5d648036.zip
llvm-ac4712482e3ff886eee7c044dd33dd4b5d648036.tar.gz
llvm-ac4712482e3ff886eee7c044dd33dd4b5d648036.tar.bz2
[LoongArch] Use FirstRelocationKind to remove ELFObjectWriter::recordRelocation special case
The current implementation of R_LARCH_SUB{8,16,32,64} and TLS relocation types relies on fixup kinds FirstLiteralRelocationKind + offset (originally intended for .reloc directives). While this is clever and prevents switch cases like ``` case fixup_...sub8: return ELF::R_LARCH_SUB8; ``` it needs revision. GNU Assembler treats .reloc directives differently from standard relocations, notably by skipping * Skipping STT_SECTION adjustments (when a referenced symbol is local and satisfies certain conditions, it can be redirected to a section symbol). * Skipping STT_TLS symbol type setting for TLS relocations. Encode relocatin type t with FirstRelocationKind+t instead of FirstLiteralRelocationKind+t. The new value is less than FirstLiteralRelocationKind and will not be treated as a .reloc directive. Close #135521
Diffstat (limited to 'clang/lib/AST/ByteCode/Compiler.cpp')
0 files changed, 0 insertions, 0 deletions