brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 5a4c0ad Raw
45 lines · plain
1# REQUIRES: ppc2 3# RUN: llvm-mc -filetype=obj -triple=powerpc64le %s -o %t.o4# RUN: llvm-readobj -r %t.o | FileCheck --check-prefix=INPUT-REL %s5# RUN: llvm-objdump -d --no-show-raw-insn %t.o | FileCheck --check-prefix=INPUT-ASM %s6 7# RUN: ld.lld --shared %t.o --soname=t.so -o %t.so8# RUN: llvm-readelf -r %t.so | FileCheck --check-prefix=SO-REL %s9# RUN: llvm-readelf -x .got %t.so | FileCheck --check-prefix=SO-GOT %s10# RUN: llvm-readelf -s %t.so | FileCheck --check-prefix=SO-SYM %s11 12## Test to make sure that the first element of a GOT section is the tocbase .TOC.13 14# INPUT-REL:          Section (3) .rela.text {15# INPUT-REL-NEXT:       0x0 R_PPC64_GOT_PCREL34 glob_int 0x016# INPUT-REL-NEXT:       0x0 R_PPC64_PCREL_OPT - 0x817# INPUT-REL-NEXT:     }18 19# INPUT-ASM-LABEL:    <test>:20# INPUT-ASM:            pld 3, 0(0), 121# INPUT-ASM-NEXT:       lwa 3, 0(3)22# INPUT-ASM-NEXT:       blr23 24# SO-REL: Relocation section '.rela.dyn'25# SO-REL:   00000000000203a0  0000000100000014 R_PPC64_GLOB_DAT       00000000000102d0 glob_int + 026 27# SO-GOT: Hex dump of section '.got':28# SO-GOT:   0x00020398 98830200 00000000 00000000 0000000029 30# SO-SYM: Symbol table '.symtab' contains 4 entries:31# SO-SYM:   3: 00000000000102d0     4 NOTYPE  GLOBAL DEFAULT     6 glob_int32 33test:34	pld 3, glob_int@got@pcrel(0), 135.Lpcrel0:36	.reloc .Lpcrel0-8,R_PPC64_PCREL_OPT,.-(.Lpcrel0-8)37	lwa 3, 0(3)38	blr39 40	.globl	glob_int41	.p2align	242glob_int:43	.long	044	.size	glob_int, 445