[all-commits] [llvm/llvm-project] eaa9ef: [lld][LoongArch] Support the R_LARCH_{ADD, SUB}_ULE...
Jinyang He via All-commits
all-commits at lists.llvm.org
Mon Mar 4 23:50:26 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: eaa9ef678c63bf392ec2d5b736605db7ea7e7338
https://github.com/llvm/llvm-project/commit/eaa9ef678c63bf392ec2d5b736605db7ea7e7338
Author: Jinyang He <hejinyang at loongson.cn>
Date: 2024-03-05 (Tue, 05 Mar 2024)
Changed paths:
M lld/ELF/Arch/LoongArch.cpp
A lld/test/ELF/loongarch-reloc-leb128.s
Log Message:
-----------
[lld][LoongArch] Support the R_LARCH_{ADD,SUB}_ULEB128 relocation types (#81133)
For a label difference like `.uleb128 A-B`, MC generates a pair of
R_LARCH_{ADD,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). It is similar to RISCV.
R_LARCH_{ADD,SUB}_ULEB128 relocations are created by Clang and GCC in
`.gcc_except_table` and other debug sections with linker relaxation
enabled. On LoongArch, first read the buf and count the available space.
Then add or sub the value. Finally truncate the expected value and fill
it into the available space.
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