brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.3 KiB · 60f4e22 Raw
84 lines · plain
1// REQUIRES: x862// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o3// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %S/Inputs/gnu-ifunc-canon-ro-pcrel.s -o %t-ro-pcrel.o4// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %S/Inputs/gnu-ifunc-canon-ro-abs.s -o %t-ro-abs.o5// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %S/Inputs/gnu-ifunc-canon-rw-addend.s -o %t-rw-addend.o6// RUN: ld.lld %t.o -o %t17// RUN: llvm-readobj -r %t1 | FileCheck --check-prefix=IREL1 %s8// RUN: ld.lld %t.o %t-ro-pcrel.o -o %t29// RUN: llvm-readobj -r %t2 | FileCheck --check-prefix=IREL1 %s10// RUN: ld.lld %t.o %t-ro-abs.o -o %t311// RUN: llvm-readobj -r %t3 | FileCheck --check-prefix=IREL1 %s12// RUN: ld.lld %t.o %t-rw-addend.o -o %t413// RUN: llvm-readobj -r %t4 | FileCheck --check-prefix=IREL1 %s14// RUN: llvm-objdump -s %t4 | FileCheck --check-prefix=DUMP %s15// RUN: ld.lld %t.o %t-rw-addend.o -o %t4a -z retpolineplt16// RUN: llvm-readobj -r %t4a | FileCheck --check-prefix=IREL1 %s17// RUN: llvm-objdump -s %t4a | FileCheck --check-prefix=DUMP2 %s18// RUN: ld.lld %t-ro-pcrel.o %t.o -o %t519// RUN: llvm-readobj -r %t5 | FileCheck --check-prefix=IREL1 %s20// RUN: ld.lld %t-ro-abs.o %t.o -o %t621// RUN: llvm-readobj -r %t6 | FileCheck --check-prefix=IREL1 %s22// RUN: ld.lld %t-rw-addend.o %t.o -o %t723// RUN: llvm-readobj -r %t7 | FileCheck --check-prefix=IREL1 %s24// RUN: ld.lld %t.o -o %t8 -pie25// RUN: llvm-readobj -r %t8 | FileCheck --check-prefix=IREL1-REL2 %s26// RUN: ld.lld %t.o %t-ro-pcrel.o -o %t9 -pie27// RUN: llvm-readobj -r %t9 | FileCheck --check-prefix=IREL1-REL2 %s28// RUN: ld.lld %t.o %t-rw-addend.o -o %t10 -pie29// RUN: llvm-readobj -r %t10 | FileCheck --check-prefix=IREL1-REL3 %s30// RUN: ld.lld %t-ro-pcrel.o %t.o -o %t11 -pie31// RUN: llvm-readobj -r %t11 | FileCheck --check-prefix=IREL1-REL2 %s32// RUN: ld.lld %t-rw-addend.o %t.o -o %t12 -pie33// RUN: llvm-readobj -r %t12 | FileCheck --check-prefix=IREL1-REL3 %s34 35// One reloc for the canonical PLT.36// IREL1-NOT: R_X86_64_37// IREL1: .rela.dyn38// IREL1-NEXT: R_X86_64_IRELATIVE39// IREL1-NOT: R_X86_64_40 41// One reloc for the canonical PLT and two RELATIVE relocations pointing to it,42// one in the GOT and one in .data.43// IREL1-REL2-NOT: R_X86_64_44// IREL1-REL2: .rela.dyn45// IREL1-REL2-NEXT: R_X86_64_RELATIVE46// IREL1-REL2-NEXT: R_X86_64_RELATIVE47// IREL1-REL2-NEXT: R_X86_64_IRELATIVE48// IREL1-REL2-NOT: R_X86_64_49 50// One reloc for the canonical PLT and three RELATIVE relocations pointing to it,51// one in the GOT and two in .data.52// IREL1-REL3-NOT: R_X86_64_53// IREL1-REL3: .rela.dyn54// IREL1-REL3-NEXT: R_X86_64_RELATIVE55// IREL1-REL3-NEXT: R_X86_64_RELATIVE56// IREL1-REL3-NEXT: R_X86_64_RELATIVE57// IREL1-REL3-NEXT: R_X86_64_IRELATIVE58// IREL1-REL3-NOT: R_X86_64_59 60// Make sure the static relocations look right, both with and without headers.61// DUMP: Contents of section .iplt:62// DUMP-NEXT: 2011f063// DUMP: Contents of section .got:64// DUMP-NEXT: 202200 f0112000 0000000065// DUMP: Contents of section .data:66// DUMP-NEXT: 203208 f0112000 00000000 f1112000 0000000067 68// DUMP2: Contents of section .plt:69// DUMP2-NEXT: 2011f070// DUMP2: Contents of section .got:71// DUMP2-NEXT: 202240 20122000 0000000072// DUMP2: Contents of section .data:73// DUMP2-NEXT: 203248 20122000 00000000 21122000 0000000074 75lea ifunc@gotpcrel(%rip), %rbx76 77.type ifunc STT_GNU_IFUNC78.globl ifunc79ifunc:80ret81 82.data83.8byte ifunc84