brintos

brintos / llvm-project-archived public Read only

0
0
Text · 4.0 KiB · 21849aa Raw
88 lines · plain
1// REQUIRES: arm2// RUN: llvm-mc -arm-add-build-attributes -filetype=obj -triple=armv7a-none-linux-gnueabi %s -o %t3// RUN: echo "SECTIONS { \4// RUN:       . = SIZEOF_HEADERS; \5// RUN:       .text_low : { *(.text_low) *(.text_low2) . = . + 0x2000000 ; *(.text_high) *(.text_high2) } \6// RUN:       } " > %t.script7// RUN: ld.lld --no-rosegment --script %t.script %t -o %t28// RUN: llvm-objdump --no-print-imm-hex -d %t2 --start-address=0x94 --stop-address=0xbc | FileCheck --check-prefix=CHECK1 %s9// RUN: llvm-objdump --no-print-imm-hex -d %t2 --start-address=0x20000bc --stop-address=0x20000de | FileCheck --check-prefix=CHECK2 %s10 11// RUN: llvm-mc -arm-add-build-attributes -filetype=obj -triple=armv7aeb-none-linux-gnueabi -mcpu=cortex-a8 %s -o %t12// RUN: ld.lld --no-rosegment --script %t.script %t -o %t213// RUN: llvm-objdump --no-print-imm-hex -d %t2 --start-address=0x94 --stop-address=0xbc | FileCheck --check-prefix=CHECK1 %s14// RUN: llvm-objdump --no-print-imm-hex -d %t2 --start-address=0x20000bc --stop-address=0x20000de | FileCheck --check-prefix=CHECK2 %s15// RUN: ld.lld --be8 --no-rosegment --script %t.script %t -o %t216// RUN: llvm-objdump --no-print-imm-hex -d %t2 --start-address=0x94 --stop-address=0xbc | FileCheck --check-prefix=CHECK1 %s17// RUN: llvm-objdump --no-print-imm-hex -d %t2 --start-address=0x20000bc --stop-address=0x20000de | FileCheck --check-prefix=CHECK2 %s18 19// Test that range extension thunks can handle location expressions within20// a Section Description21 .syntax unified22 .section .text_low, "ax", %progbits23 .thumb24 .globl _start25_start: bx lr26 .globl low_target27 .type low_target, %function28low_target:29 bl high_target30 bl high_target231 32 .section .text_low2, "ax", %progbits33 .thumb34 .globl low_target235 .type low_target2, %function36low_target2:37 bl high_target38 bl high_target239// CHECK1: Disassembly of section .text_low:40// CHECK1-EMPTY:41// CHECK1-NEXT: <_start>:42// CHECK1-NEXT:       94:       4770    bx      lr43// CHECK1: <low_target>:44// CHECK1-NEXT:       96:       f000 f803       bl      0xa0 <__Thumbv7ABSLongThunk_high_target>45// CHECK1-NEXT:       9a:       f000 f806       bl      0xaa <__Thumbv7ABSLongThunk_high_target2>46// CHECK1: <__Thumbv7ABSLongThunk_high_target>:47// CHECK1-NEXT:       a0:       f240 0cbd       movw    r12, #18948// CHECK1-NEXT:       a4:       f2c0 2c00       movt    r12, #51249// CHECK1-NEXT:       a8:       4760    bx      r1250// CHECK1: <__Thumbv7ABSLongThunk_high_target2>:51// CHECK1-NEXT:       aa:       f240 0cd9       movw    r12, #21752// CHECK1-NEXT:       ae:       f2c0 2c00       movt    r12, #51253// CHECK1-NEXT:       b2:       4760    bx      r1254// CHECK1: <low_target2>:55// CHECK1-NEXT:       b4:       f7ff fff4       bl      0xa0 <__Thumbv7ABSLongThunk_high_target>56// CHECK1-NEXT:       b8:       f7ff fff7       bl      0xaa <__Thumbv7ABSLongThunk_high_target2>57 58 .section .text_high, "ax", %progbits59 .thumb60 .globl high_target61 .type high_target, %function62high_target:63 bl low_target64 bl low_target265 66 .section .text_high2, "ax", %progbits67 .thumb68 .globl high_target269 .type high_target2, %function70high_target2:71 bl low_target72 bl low_target273 74// CHECK2: <high_target>:75// CHECK2-NEXT:  20000bc:       f000 f802       bl      0x20000c4 <__Thumbv7ABSLongThunk_low_target>76// CHECK2-NEXT:  20000c0:       f000 f805       bl      0x20000ce <__Thumbv7ABSLongThunk_low_target2>77// CHECK2: <__Thumbv7ABSLongThunk_low_target>:78// CHECK2-NEXT:  20000c4:       f240 0c97       movw    r12, #15179// CHECK2-NEXT:  20000c8:       f2c0 0c00       movt    r12, #080// CHECK2-NEXT:  20000cc:       4760    bx      r1281// CHECK2: <__Thumbv7ABSLongThunk_low_target2>:82// CHECK2-NEXT:  20000ce:       f240 0cb5       movw    r12, #18183// CHECK2-NEXT:  20000d2:       f2c0 0c00       movt    r12, #084// CHECK2-NEXT:  20000d6:       4760    bx      r1285// CHECK2: <high_target2>:86// CHECK2-NEXT:  20000d8:       f7ff fff4       bl      0x20000c4 <__Thumbv7ABSLongThunk_low_target>87// CHECK2-NEXT:  20000dc:       f7ff fff7       bl      0x20000ce <__Thumbv7ABSLongThunk_low_target2>88