diff options
author | Lu Weining <luweining@loongson.cn> | 2024-06-04 09:00:14 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-04 09:00:14 +0800 |
commit | fbdd94847814c926f2767e656ba501b4ca7dfaae (patch) | |
tree | 121d001760d85eb4909de0566972104e3627d27f /lld/test | |
parent | 8ec1161fe66def9af8973c8c073be7d043cc411c (diff) | |
download | llvm-fbdd94847814c926f2767e656ba501b4ca7dfaae.zip llvm-fbdd94847814c926f2767e656ba501b4ca7dfaae.tar.gz llvm-fbdd94847814c926f2767e656ba501b4ca7dfaae.tar.bz2 |
[LoongArch] Use R_LARCH_ALIGN without symbol as much as possible (#93775)
To support the third parameter of the alignment directive, R_LARCH_ALIGN
relocations need a non-zero symbol index.
In many cases we don't need the third parameter and can set the symbol
index to 0.
This patch will remove a lot of .Lla-relax-align* symbols and mitigate
the size regression due to
https://github.com/llvm/llvm-project/pull/72962.
Co-authored-by: Jinyang He <hejinyang@loongson.cn>
Co-authored-by: Weining Lu <luweining@loongson.cn>
Diffstat (limited to 'lld/test')
-rw-r--r-- | lld/test/ELF/loongarch-relax-emit-relocs.s | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lld/test/ELF/loongarch-relax-emit-relocs.s b/lld/test/ELF/loongarch-relax-emit-relocs.s index 581fce8..ba414e8 100644 --- a/lld/test/ELF/loongarch-relax-emit-relocs.s +++ b/lld/test/ELF/loongarch-relax-emit-relocs.s @@ -25,7 +25,7 @@ # CHECK-NEXT: R_LARCH_PCALA_LO12 _start # CHECK-NEXT: R_LARCH_RELAX *ABS* # CHECK-NEXT: nop -# CHECK-NEXT: R_LARCH_ALIGN .Lla-relax-align0+0x4 +# CHECK-NEXT: R_LARCH_ALIGN *ABS*+0xc # CHECK-NEXT: nop # CHECK-NEXT: ret @@ -37,7 +37,7 @@ # CHECKR-NEXT: R_LARCH_PCALA_LO12 _start # CHECKR-NEXT: R_LARCH_RELAX *ABS* # CHECKR-NEXT: nop -# CHECKR-NEXT: R_LARCH_ALIGN .Lla-relax-align0+0x4 +# CHECKR-NEXT: R_LARCH_ALIGN *ABS*+0xc # CHECKR-NEXT: nop # CHECKR-NEXT: nop # CHECKR-NEXT: ret |