[ELF,test] Fix FileCheck prefixes
Most violations are stale and should be removed while a few can be adjusted. Reported at #92238
This commit is contained in:
parent
5ff6c6542a
commit
aa889d7783
@ -2,7 +2,7 @@
|
|||||||
// RUN: llvm-mc -filetype=obj -arm-add-build-attributes -triple=armv7a-none-linux-gnueabi %s -o %t
|
// 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: ld.lld --hash-style=sysv %t --shared -o %t2
|
||||||
// RUN: llvm-readobj --relocations %t2 | FileCheck %s
|
// 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
|
// Check that the relative R_ARM_PREL31 relocation can access a PLT entry
|
||||||
// for when the personality routine is referenced from a shared library.
|
// for when the personality routine is referenced from a shared library.
|
||||||
|
@ -28,16 +28,6 @@
|
|||||||
# CHECK-NEXT: ]
|
# CHECK-NEXT: ]
|
||||||
# CHECK-NOT: Primary GOT
|
# 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
|
.text
|
||||||
.globl __start
|
.globl __start
|
||||||
.type __start,@function
|
.type __start,@function
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
# RUN: llvm-mc -filetype=obj -triple=powerpcle %s -o %t.le.o
|
# RUN: llvm-mc -filetype=obj -triple=powerpcle %s -o %t.le.o
|
||||||
# RUN: ld.lld %t.le.o -o %t
|
# RUN: ld.lld %t.le.o -o %t
|
||||||
# RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s
|
# 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
|
.section .R_PPC_REL14,"ax",@progbits
|
||||||
beq 1f
|
beq 1f
|
||||||
@ -23,7 +24,7 @@
|
|||||||
.long 1f - .
|
.long 1f - .
|
||||||
1:
|
1:
|
||||||
# HEX-LABEL: section .R_PPC_REL32:
|
# HEX-LABEL: section .R_PPC_REL32:
|
||||||
# HEX-NEXT: 10010008 00000004
|
# HEX-NEXT: 04000000
|
||||||
|
|
||||||
.section .R_PPC_PLTREL24,"ax",@progbits
|
.section .R_PPC_PLTREL24,"ax",@progbits
|
||||||
b 1f@PLT+32768
|
b 1f@PLT+32768
|
||||||
|
@ -73,9 +73,7 @@
|
|||||||
|
|
||||||
## DT_PLTGOT points to .plt
|
## DT_PLTGOT points to .plt
|
||||||
# SEC: .plt NOBITS 0000000010030168 040168 000028 00 WA 0 0 8
|
# 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: 0x0000000000000003 (PLTGOT) 0x10030168
|
||||||
# SEC-OG: 0x0000000000000003 (PLTGOT) 0x10030168
|
|
||||||
|
|
||||||
## DT_PLTGOT points to .plt
|
## DT_PLTGOT points to .plt
|
||||||
# SEC-NOP10: .plt NOBITS 0000000010030168 040168 000028 00 WA 0 0 8
|
# 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.
|
## Check that we emit 3 R_PPC64_JMP_SLOT in .rela.plt.
|
||||||
# REL: .rela.plt {
|
# REL: .rela.plt {
|
||||||
# REL-NEXT: 0x10030178 R_PPC64_JMP_SLOT callee_global_stother0 0x0
|
# 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: 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: 0x10030188 R_PPC64_JMP_SLOT callee_global_TOC 0x0
|
||||||
# REL-NEXT-OG: 0x10030178 R_PPC64_JMP_SLOT callee_global_TOC 0x0
|
|
||||||
# REL-NEXT: }
|
# REL-NEXT: }
|
||||||
|
|
||||||
# REL-NOP10: .rela.plt {
|
# REL-NOP10: .rela.plt {
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
# RUN: echo '.globl ifunc; .type ifunc, %gnu_indirect_function; ifunc:' | \
|
# RUN: echo '.globl ifunc; .type ifunc, %gnu_indirect_function; ifunc:' | \
|
||||||
# RUN: llvm-mc -filetype=obj -triple=powerpc64le - -o %t1.o
|
# RUN: llvm-mc -filetype=obj -triple=powerpc64le - -o %t1.o
|
||||||
# RUN: ld.lld %t.o %t1.o -o %t
|
# 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-readelf -x .toc %t | FileCheck --check-prefix=HEX %s
|
||||||
# RUN: llvm-objdump -d %t | FileCheck --check-prefix=DIS %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
|
## still perform toc-indirect to toc-relative relaxation because the distance
|
||||||
## to the address of the canonical PLT is fixed.
|
## to the address of the canonical PLT is fixed.
|
||||||
|
|
||||||
# SEC: .text PROGBITS 00000000100101e0
|
# SEC: .text PROGBITS [[#%x,TEXT:]]
|
||||||
# SEC: .plt NOBITS 0000000010030200
|
# SEC: .plt NOBITS [[#%x,PLT:]]
|
||||||
# SEC: 00000000100101e8 0 FUNC GLOBAL DEFAULT 3 ifunc
|
# 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.
|
## .toc[0] stores the address of the canonical PLT.
|
||||||
# HEX: section '.toc':
|
# HEX: section '.toc':
|
||||||
# HEX-NEXT: 0x100201f8 e8010110 00000000
|
# HEX-NEXT: 0x100201f8 e8010110 00000000
|
||||||
|
|
||||||
# REL: .rela.dyn {
|
|
||||||
# REL-NEXT: 0x100301f8 R_PPC64_IRELATIVE - 0x100101e8
|
|
||||||
# REL-NEXT: }
|
|
||||||
|
|
||||||
# DIS: addi 3, 3,
|
# DIS: addi 3, 3,
|
||||||
|
|
||||||
addis 3, 2, .toc@toc@ha
|
addis 3, 2, .toc@toc@ha
|
||||||
|
@ -16,10 +16,6 @@
|
|||||||
# SEC64: [ [[#SDATA:]]] .sdata PROGBITS {{0*}}000032e0
|
# SEC64: [ [[#SDATA:]]] .sdata PROGBITS {{0*}}000032e0
|
||||||
# SEC64: {{0*}}00003ae0 0 NOTYPE GLOBAL DEFAULT [[#SDATA]] __global_pointer$
|
# 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
|
# ERR: error: relocation R_RISCV_PCREL_HI20 cannot be used against symbol '__global_pointer$'; recompile with -fPIC
|
||||||
|
|
||||||
## -r mode does not define __global_pointer$.
|
## -r mode does not define __global_pointer$.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user