2018-06-27 06:20:04 +08:00
|
|
|
// REQUIRES: arm
|
2018-08-20 17:19:30 +08:00
|
|
|
// RUN: llvm-mc -arm-add-build-attributes -filetype=obj -triple=thumbv7a-none-linux-gnueabi %s -o %t
|
2019-07-22 19:37:03 +08:00
|
|
|
// RUN: ld.lld %t -o %t2
|
2021-07-29 03:47:12 +08:00
|
|
|
// RUN: llvm-objdump -d --no-show-raw-insn --start-address=0x21000 --stop-address=0x21006 %t2 | FileCheck --check-prefix=CHECK1 %s
|
|
|
|
// RUN: llvm-objdump -d --no-show-raw-insn --start-address=0x22004 --stop-address=0x22008 %t2 | FileCheck --check-prefix=CHECK2 %s
|
|
|
|
// RUN: llvm-objdump -d --no-show-raw-insn --start-address=0x1021ff8 --stop-address=0x1021ffc %t2 | FileCheck --check-prefix=CHECK3 %s
|
|
|
|
// RUN: llvm-objdump -d --no-show-raw-insn --start-address=0x2012ff8 --stop-address=0x2021ffc %t2 | FileCheck --check-prefix=CHECK4 %s
|
|
|
|
// RUN: llvm-objdump -d --no-show-raw-insn --start-address=0x3021fec --stop-address=0x3021ff6 %t2 | FileCheck --check-prefix=CHECK5 %s
|
2017-10-27 17:04:11 +08:00
|
|
|
.syntax unified
|
|
|
|
.balign 0x1000
|
|
|
|
.thumb
|
|
|
|
.text
|
|
|
|
.globl _start
|
|
|
|
.type _start, %function
|
|
|
|
_start:
|
|
|
|
bx lr
|
|
|
|
.space 0x1000
|
2020-04-18 23:06:37 +08:00
|
|
|
// CHECK1: <_start>:
|
|
|
|
// CHECK1-NEXT: 21000: bx lr
|
|
|
|
// CHECK1: <$d.1>:
|
|
|
|
// CHECK1-NEXT: 21002: 00 00 00 00 .word 0x00000000
|
2018-10-03 00:53:12 +08:00
|
|
|
|
2017-10-27 17:04:11 +08:00
|
|
|
|
2020-04-18 23:06:37 +08:00
|
|
|
// CHECK2: <__Thumbv7ABSLongThunk__start>:
|
2021-06-30 17:34:52 +08:00
|
|
|
// CHECK2-NEXT: 22004: b.w 0x21000 <_start>
|
2017-10-27 17:04:11 +08:00
|
|
|
|
2020-04-18 23:06:37 +08:00
|
|
|
/// Gigantic section where we need a ThunkSection either side of it
|
2017-10-27 17:04:11 +08:00
|
|
|
.section .text.large1, "ax", %progbits
|
|
|
|
.balign 4
|
|
|
|
.space (16 * 1024 * 1024) - 16
|
|
|
|
bl _start
|
|
|
|
.space (16 * 1024 * 1024) - 4
|
|
|
|
bl _start
|
|
|
|
.space (16 * 1024 * 1024) - 16
|
2021-06-30 17:34:52 +08:00
|
|
|
// CHECK3: 1021ff8: bl 0x22004 <__Thumbv7ABSLongThunk__start>
|
|
|
|
// CHECK4: 2021ff8: bl 0x3021fec <__Thumbv7ABSLongThunk__start>
|
2017-10-27 17:04:11 +08:00
|
|
|
|
2020-04-18 23:06:37 +08:00
|
|
|
// CHECK5: <__Thumbv7ABSLongThunk__start>:
|
|
|
|
// CHECK5-NEXT: 3021fec: movw r12, #4097
|
|
|
|
// CHECK5-NEXT: 3021ff0: movt r12, #2
|
|
|
|
// CHECK5-NEXT: 3021ff4: bx r12
|