67 lines · plain
1// REQUIRES: arm2// RUN: llvm-mc -arm-add-build-attributes -filetype=obj -triple=thumbv7a-none-linux-gnueabi %s -o %t3// RUN: echo "SECTIONS { \4// RUN: .text_low 0x100000 : { *(.text_low) } \5// RUN: .text_high 0x2000000 : { *(.text_high) } \6// RUN: .data : { *(.data) } \7// RUN: }" > %t.script8// RUN: ld.lld --script %t.script %t -o %t29// RUN: llvm-objdump --no-print-imm-hex -d %t2 | FileCheck %s10 .syntax unified11 .section .text_low, "ax", %progbits12 .thumb13 .globl _start14_start: bx lr15 .globl low_target16 .type low_target, %function17low_target:18 bl high_target19 bl orphan_target20// CHECK: Disassembly of section .text_low:21// CHECK-EMPTY:22// CHECK-NEXT: <_start>:23// CHECK-NEXT: 100000: 4770 bx lr24// CHECK: <low_target>:25// CHECK-NEXT: 100002: f000 f803 bl 0x10000c <__Thumbv7ABSLongThunk_high_target>26// CHECK-NEXT: 100006: f000 f806 bl 0x100016 <__Thumbv7ABSLongThunk_orphan_target>27// CHECK: <__Thumbv7ABSLongThunk_high_target>:28// CHECK-NEXT: 10000c: f240 0c01 movw r12, #129// CHECK-NEXT: 100010: f2c0 2c00 movt r12, #51230// CHECK-NEXT: 100014: 4760 bx r1231// CHECK: <__Thumbv7ABSLongThunk_orphan_target>:32// CHECK-NEXT: 100016: f240 0c15 movw r12, #2133// CHECK-NEXT: 10001a: f2c0 2c00 movt r12, #51234// CHECK-NEXT: 10001e: 4760 bx r1235 .section .text_high, "ax", %progbits36 .thumb37 .globl high_target38 .type high_target, %function39high_target:40 bl low_target41 bl orphan_target42// CHECK: Disassembly of section .text_high:43// CHECK-EMPTY:44// CHECK-NEXT: <high_target>:45// CHECK-NEXT: 2000000: f000 f802 bl 0x2000008 <__Thumbv7ABSLongThunk_low_target>46// CHECK-NEXT: 2000004: f000 f806 bl 0x2000014 <orphan_target>47// CHECK: <__Thumbv7ABSLongThunk_low_target>:48// CHECK-NEXT: 2000008: f240 0c03 movw r12, #349// CHECK-NEXT: 200000c: f2c0 0c10 movt r12, #1650// CHECK-NEXT: 2000010: 4760 bx r1251 52 .section orphan, "ax", %progbits53 .thumb54 .globl orphan_target55 .type orphan_target, %function56orphan_target:57 bl low_target58 bl high_target59// CHECK: Disassembly of section orphan:60// CHECK-EMPTY:61// CHECK-NEXT: <orphan_target>:62// CHECK-NEXT: 2000014: f7ff fff8 bl 0x2000008 <__Thumbv7ABSLongThunk_low_target>63// CHECK-NEXT: 2000018: f7ff fff2 bl 0x2000000 <high_target>64 65 .data66 .word 1067