diff options
author | Fangrui Song <i@maskray.me> | 2024-05-17 19:58:10 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-17 19:58:10 -0700 |
commit | faf39f45e3107d6bcb5f9cef8b5681c116b261d7 (patch) | |
tree | ffd9b1d94eca327439eb1bbb18679d4559731848 /lld/test | |
parent | 1e9324a8c734aaa933d2672522cc22d5022c6200 (diff) | |
download | llvm-faf39f45e3107d6bcb5f9cef8b5681c116b261d7.zip llvm-faf39f45e3107d6bcb5f9cef8b5681c116b261d7.tar.gz llvm-faf39f45e3107d6bcb5f9cef8b5681c116b261d7.tar.bz2 |
Revert "[LoongArch] Use R_LARCH_ALIGN with section symbol (#84741)"
This reverts commit 01f79899ba349a0200586c8d05f5e22cca2ced31.
This unusual special case has been discussed on the binutils mailing
list. The approach will be revisited:
https://sourceware.org/pipermail/binutils/2024-May/134092.html
Pull Request: https://github.com/llvm/llvm-project/pull/92584
Diffstat (limited to 'lld/test')
-rw-r--r-- | lld/test/ELF/loongarch-relax-align-ldr.s | 28 | ||||
-rw-r--r-- | lld/test/ELF/loongarch-relax-emit-relocs.s | 5 |
2 files changed, 2 insertions, 31 deletions
diff --git a/lld/test/ELF/loongarch-relax-align-ldr.s b/lld/test/ELF/loongarch-relax-align-ldr.s deleted file mode 100644 index 6534dc9..0000000 --- a/lld/test/ELF/loongarch-relax-align-ldr.s +++ /dev/null @@ -1,28 +0,0 @@ -# REQUIRES: loongarch -## Test `ld -r` not changes the addend of R_LARCH_ALIGN. - -# RUN: llvm-mc --filetype=obj --triple=loongarch64 --mattr=+relax %s -o %t.64.o -# RUN: ld.lld -r %t.64.o %t.64.o -o %t.64.r -# RUN: llvm-objdump -dr --no-show-raw-insn %t.64.r | FileCheck %s - -# CHECK: <.text>: -# CHECK-NEXT: break 1 -# CHECK-NEXT: nop -# CHECK-NEXT: {{0*}}04: R_LARCH_ALIGN .text+0x804 -# CHECK-NEXT: nop -# CHECK-NEXT: nop -# CHECK-NEXT: break 2 -# CHECK-NEXT: break 0 -# CHECK-NEXT: break 0 -# CHECK-NEXT: break 0 -# CHECK-NEXT: break 1 -# CHECK-NEXT: nop -# CHECK-NEXT: {{0*}}24: R_LARCH_ALIGN .text+0x804 -# CHECK-NEXT: nop -# CHECK-NEXT: nop -# CHECK-NEXT: break 2 - -.text -break 1 -.p2align 4, , 8 -break 2 diff --git a/lld/test/ELF/loongarch-relax-emit-relocs.s b/lld/test/ELF/loongarch-relax-emit-relocs.s index 9007f8f..581fce8 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 .text+0x4 +# CHECK-NEXT: R_LARCH_ALIGN .Lla-relax-align0+0x4 # CHECK-NEXT: nop # CHECK-NEXT: ret @@ -37,12 +37,11 @@ # CHECKR-NEXT: R_LARCH_PCALA_LO12 _start # CHECKR-NEXT: R_LARCH_RELAX *ABS* # CHECKR-NEXT: nop -# CHECKR-NEXT: R_LARCH_ALIGN .text+0x4 +# CHECKR-NEXT: R_LARCH_ALIGN .Lla-relax-align0+0x4 # CHECKR-NEXT: nop # CHECKR-NEXT: nop # CHECKR-NEXT: ret -.text .global _start _start: la.pcrel $a0, _start |