brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 9ebf7f5 Raw
35 lines · plain
1// REQUIRES: aarch642// RUN: llvm-mc -filetype=obj -triple=aarch64 %s -o %t.o3// RUN: echo 'SECTIONS { \4// RUN:         .text.1 0x10000 : { *(.text.1) } \5// RUN:         .text.2 0x200000000 : AT(0x20000) { *(.text.2) } \6// RUN:       } ' > %t.script7// RUN: ld.lld --script %t.script %t.o -o %t8// RUN: llvm-objdump -d --no-show-raw-insn --print-imm-hex %t | FileCheck %s9 10// The word should be an offset to the range extension thunk.11// CHECK-LABEL: <_start>:12// CHECK-NEXT: 10000: 08 00 00 00     .word   0x0000000813 14// The thunk redirects to the address of callee.15// CHECK-LABEL: <__AArch64AbsLongThunk_callee>:16// CHECK-NEXT: 10008: ldr     x16, 0x10010 <__AArch64AbsLongThunk_callee+0x8>17// CHECK-NEXT:        br      x1618// CHECK-NEXT: 00 00 00 00    .word   0x0000000019// CHECK-NEXT: 02 00 00 00    .word   0x0000000220 21// CHECK-LABEL: <callee>:22// CHECK-NEXT:    200000000:      ret23 24  .section .text.1, "ax", %progbits25  .global _start26  .type _start, %function27_start:28  .word callee@PLT - .29 30  .section .text.2, "ax", %progbits31  .global callee32  .type callee, %function33callee:34  ret35