aboutsummaryrefslogtreecommitdiff
path: root/lld
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2024-05-15 15:41:20 -0700
committerFangrui Song <i@maskray.me>2024-05-15 15:41:20 -0700
commitaa889d7783af050ce5d19af67c7225ee119d625e (patch)
tree8e8c213e6179c8dd5576b01d90c23f367100a496 /lld
parent5ff6c6542ac451daaed6c417e481e313165d3454 (diff)
downloadllvm-aa889d7783af050ce5d19af67c7225ee119d625e.zip
llvm-aa889d7783af050ce5d19af67c7225ee119d625e.tar.gz
llvm-aa889d7783af050ce5d19af67c7225ee119d625e.tar.bz2
[ELF,test] Fix FileCheck prefixes
Most violations are stale and should be removed while a few can be adjusted. Reported at #92238
Diffstat (limited to 'lld')
-rw-r--r--lld/test/ELF/arm-exidx-shared.s2
-rw-r--r--lld/test/ELF/mips-tls-hilo.s10
-rw-r--r--lld/test/ELF/ppc32-reloc-rel.s3
-rw-r--r--lld/test/ELF/ppc64-pcrel-call-to-extern.s5
-rw-r--r--lld/test/ELF/ppc64-toc-relax-ifunc.s13
-rw-r--r--lld/test/ELF/riscv-gp.s4
6 files changed, 8 insertions, 29 deletions
diff --git a/lld/test/ELF/arm-exidx-shared.s b/lld/test/ELF/arm-exidx-shared.s
index fce605d..2e484e5 100644
--- a/lld/test/ELF/arm-exidx-shared.s
+++ b/lld/test/ELF/arm-exidx-shared.s
@@ -2,7 +2,7 @@
// RUN: llvm-mc -filetype=obj -arm-add-build-attributes -triple=armv7a-none-linux-gnueabi %s -o %t
// RUN: ld.lld --hash-style=sysv %t --shared -o %t2
// RUN: llvm-readobj --relocations %t2 | FileCheck %s
-// RUN: llvm-objdump -s --triple=armv7a-none-linux-gnueabi %t2 | FileCheck --check-prefix=CHECK-EXTAB-NEXT %s
+// RUN: llvm-objdump -s --triple=armv7a-none-linux-gnueabi %t2 | FileCheck --check-prefix=CHECK-EXTAB %s
// Check that the relative R_ARM_PREL31 relocation can access a PLT entry
// for when the personality routine is referenced from a shared library.
diff --git a/lld/test/ELF/mips-tls-hilo.s b/lld/test/ELF/mips-tls-hilo.s
index 6fd2033..9c67f9f 100644
--- a/lld/test/ELF/mips-tls-hilo.s
+++ b/lld/test/ELF/mips-tls-hilo.s
@@ -28,16 +28,6 @@
# CHECK-NEXT: ]
# CHECK-NOT: Primary GOT
-# SO: Relocations [
-# SO-NEXT: ]
-# SO: Primary GOT {
-# SO: Local entries [
-# SO-NEXT: ]
-# SO-NEXT: Global entries [
-# SO-NEXT: ]
-# SO-NEXT: Number of TLS and multi-GOT entries: 0
-# SO-NEXT: }
-
.text
.globl __start
.type __start,@function
diff --git a/lld/test/ELF/ppc32-reloc-rel.s b/lld/test/ELF/ppc32-reloc-rel.s
index b89e0b4..d13ebdb 100644
--- a/lld/test/ELF/ppc32-reloc-rel.s
+++ b/lld/test/ELF/ppc32-reloc-rel.s
@@ -6,6 +6,7 @@
# RUN: llvm-mc -filetype=obj -triple=powerpcle %s -o %t.le.o
# RUN: ld.lld %t.le.o -o %t
# RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s
+# RUN: llvm-objdump -s %t | FileCheck %s --check-prefix=HEX
.section .R_PPC_REL14,"ax",@progbits
beq 1f
@@ -23,7 +24,7 @@
.long 1f - .
1:
# HEX-LABEL: section .R_PPC_REL32:
-# HEX-NEXT: 10010008 00000004
+# HEX-NEXT: 04000000
.section .R_PPC_PLTREL24,"ax",@progbits
b 1f@PLT+32768
diff --git a/lld/test/ELF/ppc64-pcrel-call-to-extern.s b/lld/test/ELF/ppc64-pcrel-call-to-extern.s
index e5846e8..de05b73 100644
--- a/lld/test/ELF/ppc64-pcrel-call-to-extern.s
+++ b/lld/test/ELF/ppc64-pcrel-call-to-extern.s
@@ -73,9 +73,7 @@
## DT_PLTGOT points to .plt
# SEC: .plt NOBITS 0000000010030168 040168 000028 00 WA 0 0 8
-# SEC-OG: .plt NOBITS 0000000010030158 040158 000028 00 WA 0 0 8
# SEC: 0x0000000000000003 (PLTGOT) 0x10030168
-# SEC-OG: 0x0000000000000003 (PLTGOT) 0x10030168
## DT_PLTGOT points to .plt
# SEC-NOP10: .plt NOBITS 0000000010030168 040168 000028 00 WA 0 0 8
@@ -86,11 +84,8 @@
## Check that we emit 3 R_PPC64_JMP_SLOT in .rela.plt.
# REL: .rela.plt {
# REL-NEXT: 0x10030178 R_PPC64_JMP_SLOT callee_global_stother0 0x0
-# REL-NEXT-OG: 0x10030168 R_PPC64_JMP_SLOT callee_global_stother0 0x0
# REL-NEXT: 0x10030180 R_PPC64_JMP_SLOT callee_global_stother1 0x0
-# REL-NEXT-OG: 0x10030170 R_PPC64_JMP_SLOT callee_global_stother1 0x0
# REL-NEXT: 0x10030188 R_PPC64_JMP_SLOT callee_global_TOC 0x0
-# REL-NEXT-OG: 0x10030178 R_PPC64_JMP_SLOT callee_global_TOC 0x0
# REL-NEXT: }
# REL-NOP10: .rela.plt {
diff --git a/lld/test/ELF/ppc64-toc-relax-ifunc.s b/lld/test/ELF/ppc64-toc-relax-ifunc.s
index 9fb1bf0..00a63c7e 100644
--- a/lld/test/ELF/ppc64-toc-relax-ifunc.s
+++ b/lld/test/ELF/ppc64-toc-relax-ifunc.s
@@ -4,7 +4,7 @@
# RUN: echo '.globl ifunc; .type ifunc, %gnu_indirect_function; ifunc:' | \
# RUN: llvm-mc -filetype=obj -triple=powerpc64le - -o %t1.o
# RUN: ld.lld %t.o %t1.o -o %t
-# RUN: llvm-readelf -S -s %t | FileCheck --check-prefix=SEC %s
+# RUN: llvm-readelf -Ssr %t | FileCheck --check-prefix=SEC %s
# RUN: llvm-readelf -x .toc %t | FileCheck --check-prefix=HEX %s
# RUN: llvm-objdump -d %t | FileCheck --check-prefix=DIS %s
@@ -13,18 +13,15 @@
## still perform toc-indirect to toc-relative relaxation because the distance
## to the address of the canonical PLT is fixed.
-# SEC: .text PROGBITS 00000000100101e0
-# SEC: .plt NOBITS 0000000010030200
-# SEC: 00000000100101e8 0 FUNC GLOBAL DEFAULT 3 ifunc
+# SEC: .text PROGBITS [[#%x,TEXT:]]
+# SEC: .plt NOBITS [[#%x,PLT:]]
+# SEC: {{0*}}[[#PLT]] {{.+}} R_PPC64_IRELATIVE [[#TEXT+8]]
+# SEC: {{0*}}[[#TEXT+8]] 0 FUNC GLOBAL DEFAULT 3 ifunc
## .toc[0] stores the address of the canonical PLT.
# HEX: section '.toc':
# HEX-NEXT: 0x100201f8 e8010110 00000000
-# REL: .rela.dyn {
-# REL-NEXT: 0x100301f8 R_PPC64_IRELATIVE - 0x100101e8
-# REL-NEXT: }
-
# DIS: addi 3, 3,
addis 3, 2, .toc@toc@ha
diff --git a/lld/test/ELF/riscv-gp.s b/lld/test/ELF/riscv-gp.s
index 29411d1..e82e36e 100644
--- a/lld/test/ELF/riscv-gp.s
+++ b/lld/test/ELF/riscv-gp.s
@@ -16,10 +16,6 @@
# SEC64: [ [[#SDATA:]]] .sdata PROGBITS {{0*}}000032e0
# SEC64: {{0*}}00003ae0 0 NOTYPE GLOBAL DEFAULT [[#SDATA]] __global_pointer$
-## __global_pointer$ - 0x1000 = 4096*3-2048
-# DIS: 1000: auipc gp, 3
-# DIS-NEXT: addi gp, gp, -2048
-
# ERR: error: relocation R_RISCV_PCREL_HI20 cannot be used against symbol '__global_pointer$'; recompile with -fPIC
## -r mode does not define __global_pointer$.