brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 8fb5e9d Raw
44 lines · plain
1# REQUIRES: aarch642 3# RUN: rm -rf %t && split-file %s %t && cd %t4 5# RUN: llvm-mc -filetype=obj -triple=aarch64 %p/Inputs/shared.s -o lib.o6# RUN: ld.lld -shared lib.o -soname lib.so -o lib.so7 8## Checks if got access to dynamic objects is done through a got relative9## dynamic relocation and not using plt relative (R_AARCH64_JUMP_SLOT).10# RELOC:      .rela.dyn {11# RELOC-NEXT:   0x220318 R_AARCH64_GLOB_DAT bar 0x012# RELOC-NEXT: }13 14#--- small.s15 16# RUN: llvm-mc -filetype=obj -triple=aarch64 small.s -o small.o17# RUN: ld.lld lib.so small.o -o small18# RUN: llvm-readobj -r small | FileCheck --check-prefix=RELOC %s19# RUN: llvm-objdump -d --no-show-raw-insn small | FileCheck --check-prefix=DIS-SMALL %s20 21## page(0x220318) & 0xff8 = 0x31822# DIS-SMALL:      <_start>:23# DIS-SMALL-NEXT: adrp x0, 0x22000024# DIS-SMALL-NEXT: ldr x0, [x0, #0x318]25 26.globl _start27_start:28  adrp x0, :got:bar29  ldr  x0, [x0, :got_lo12:bar]30 31#--- tiny.s32 33# RUN: llvm-mc -filetype=obj -triple=aarch64 tiny.s -o tiny.o34# RUN: ld.lld lib.so tiny.o -o tiny35# RUN: llvm-readobj -r tiny | FileCheck --check-prefix=RELOC %s36# RUN: llvm-objdump -d --no-show-raw-insn tiny | FileCheck --check-prefix=DIS-TINY %s37 38# DIS-TINY:      <_start>:39# DIS-TINY-NEXT: ldr x0, 0x22031840 41.globl _start42_start:43  ldr  x0, :got:bar44