aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/FileUtilities.cpp
diff options
context:
space:
mode:
authorluxufan <932494295@qq.com>2022-01-14 23:02:27 +0800
committerluxufan <932494295@qq.com>2022-01-26 13:50:23 +0800
commitd606e23305015f14072ed59e8e71d6b27d010b48 (patch)
tree82a46f3e722175abe34c50ad4943bd3c135f7838 /llvm/lib/Support/FileUtilities.cpp
parentcc4beda039ba5441b76b5b112dd5f69553965186 (diff)
downloadllvm-d606e23305015f14072ed59e8e71d6b27d010b48.zip
llvm-d606e23305015f14072ed59e8e71d6b27d010b48.tar.gz
llvm-d606e23305015f14072ed59e8e71d6b27d010b48.tar.bz2
[MC] Support constant offset for symbol PendingFixup
This patch add support relocation offset of sym+constant(like `foo+4`) form for pending fixup. In the past, llvm-mc ignored the constant in sym+constant form, for `foo+4`, `4` would be ignored. And test case ``` .text ret nop nop .reloc foo+4, R_RISCV_32, 6 .data .globl foo foo: .word 0 .word 0 .word 0 ``` when run `llvm-mc -filetype=obj -triple=riscv64 %s | llvm-readobj -r` The output is ``` Relocations [ Section (3) .rela.text { 0x0 R_RISCV_32 - 0x6 } ] ``` After applying this patch, the output is ``` Relocations [ Section (3) .rela.text { 0x4 R_RISCV_32 - 0x6 } ] ``` Differential Revision: https://reviews.llvm.org/D117316
Diffstat (limited to 'llvm/lib/Support/FileUtilities.cpp')
0 files changed, 0 insertions, 0 deletions