aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2023-11-21 07:43:29 -0800
committerGitHub <noreply@github.com>2023-11-21 07:43:29 -0800
commit7ffabb61a5569444b5ac9322e22e5471cc5e4a77 (patch)
treefaa88b07227ac152659fa5623eb2e876f4feacdb /llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
parent61835152ca9fb6b008711d6fb873ea50d4e566af (diff)
downloadllvm-7ffabb61a5569444b5ac9322e22e5471cc5e4a77.zip
llvm-7ffabb61a5569444b5ac9322e22e5471cc5e4a77.tar.gz
llvm-7ffabb61a5569444b5ac9322e22e5471cc5e4a77.tar.bz2
[ELF] Support R_RISCV_SET_ULEB128/R_RISCV_SUB_ULEB128 in non-SHF_ALLOC sections (#72610)
For a label difference like `.uleb128 A-B`, MC generates a pair of R_RISCV_SET_ULEB128/R_RISCV_SUB_ULEB128 if A-B cannot be folded as a constant. GNU assembler generates a pair of relocations in more cases (when A or B is in a code section with linker relaxation). `.uleb128 A-B` is primarily used by DWARF v5 .debug_loclists/.debug_rnglists (DW_LLE_offset_pair/DW_RLE_offset_pair entry kinds) implemented in Clang and GCC. `.uleb128 A-B` can be used in SHF_ALLOC sections as well (e.g. `.gcc_except_table`). This patch does not handle SHF_ALLOC. `-z dead-reloc-in-nonalloc=` can be used to change the relocated value, if the R_RISCV_SET_ULEB128 symbol is in a discarded section. We don't check the R_RISCV_SUB_ULEB128 symbol since for the expected cases A and B should be defined in the same input section.
Diffstat (limited to 'llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp')
0 files changed, 0 insertions, 0 deletions