brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 1d98811 Raw
49 lines · plain
1# REQUIRES: aarch642# RUN: llvm-mc -filetype=obj -triple=aarch64 %s -o %t.o3# RUN: ld.lld %t.o -o %t4# RUN: llvm-objdump -d --no-show-raw-insn --print-imm-hex %t | FileCheck %s5# RUN: llvm-readelf -S %t | FileCheck %s --check-prefix=SEC6# RUN: llvm-readobj -r %t | FileCheck %s --check-prefix=RELOC7 8# CHECK:      Disassembly of section .text:9# CHECK-EMPTY:10# CHECK-NEXT: <myfunc>:11# CHECK-NEXT:   210170:12 13# CHECK:      <main>:14# .got.plt - page(0x210174) = 0x220190 - 0x210000 = 0x1019015# CHECK-NEXT:   210174: adrp    x8, 0x22000016# CHECK-NEXT:   210178: ldr     x8, [x8, #0x190]17# CHECK-NEXT:   21017c: ret18 19# CHECK:      Disassembly of section .iplt:20# CHECK-EMPTY:21# CHECK-NEXT: <.iplt>:22# .got.plt - page(0x210180) = 0x220190 - 0x210000 = 0x1019023# CHECK-NEXT:   210180: adrp    x16, 0x22000024# CHECK-NEXT:   210184: ldr     x17, [x16, #0x190]25# CHECK-NEXT:   210188: add     x16, x16, #0x19026# CHECK-NEXT:   21018c: br      x1727 28# SEC: .got.plt PROGBITS 0000000000220190 000190 000008 00 WA 0 0 829 30# RELOC:      Relocations [31# RELOC-NEXT:   Section {{.*}} .rela.dyn {32# RELOC-NEXT:     0x220190 R_AARCH64_IRELATIVE - 0x21017033# RELOC-NEXT:   }34# RELOC-NEXT: ]35 36.text37.globl myfunc38.type myfunc,@gnu_indirect_function39myfunc:40 ret41 42.text43.globl main44.type main,@function45main:46 adrp x8, :got:myfunc47 ldr  x8, [x8, :got_lo12:myfunc]48 ret49