aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp
diff options
context:
space:
mode:
authorYouling Tang <tangyouling@loongson.cn>2022-11-16 15:52:27 +0800
committerWeining Lu <luweining@loongson.cn>2022-11-16 15:52:30 +0800
commitb18cdeac79d0e084ac735fb1b9bbfd464d3d030c (patch)
tree4d04f7caad9ae728fee11fae2e6ed80f207a5501 /llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp
parent4787a48b96038ecebd86782ea72233ab12dfca03 (diff)
downloadllvm-b18cdeac79d0e084ac735fb1b9bbfd464d3d030c.zip
llvm-b18cdeac79d0e084ac735fb1b9bbfd464d3d030c.tar.gz
llvm-b18cdeac79d0e084ac735fb1b9bbfd464d3d030c.tar.bz2
[MC][LoongArch] Fix needsRelocateWithSymbol() implementation
LoongArch should be `section plus offset`, so use the generic implementation of `llvm/lib/MC/MCELFObjectTargetWriter.cpp` to return `false` directly, like x86 and aarch64. ``` $ cat test.c static int __attribute__((section(".text.another"))) test(int a, int b) { return a + b; } static int a = 1, b = 2; int foo() { test(a, b); return 0; } $ gcc -c test.c $ readelf -Wr test.o Relocation section '.rela.text' at offset 0x2a0 contains 5 entries: Offset Info Type Symbol's Value Symbol's Name + Addend 0000000000000010 0000000300000047 R_LARCH_PCALA_HI20 0000000000000000 .data + 0 0000000000000014 0000000300000048 R_LARCH_PCALA_LO12 0000000000000000 .data + 0 0000000000000018 0000000300000047 R_LARCH_PCALA_HI20 0000000000000000 .data + 4 000000000000001c 0000000300000048 R_LARCH_PCALA_LO12 0000000000000000 .data + 4 0000000000000028 0000000500000042 R_LARCH_B26 0000000000000000 .text.another + 0 Relocation section '.rela.eh_frame' at offset 0x318 contains 2 entries: Offset Info Type Symbol's Value Symbol's Name + Addend 000000000000001c 0000000500000063 R_LARCH_32_PCREL 0000000000000000 .text.another + 0 000000000000003c 0000000200000063 R_LARCH_32_PCREL 0000000000000000 .text + 0 ``` Reviewed By: SixWeining, MaskRay Differential Revision: https://reviews.llvm.org/D137384
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp')
0 files changed, 0 insertions, 0 deletions