mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-03 17:31:50 +00:00
575c4addce
In Thumb1 mode, bl instruction might be selected for branches between basic blocks in the function if the offset is greater than 2KB. However, this might cause SEGV because the destination symbol is not marked as thumb function and the execution mode will be reset to ARM mode. Since we are sure that these symbols are in the same data fragment, we can simply resolve these local symbols, and don't emit any relocation information for this bl instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200842 91177308-0d34-0410-b5e6-96231b3b80d8
27 lines
409 B
ArmAsm
27 lines
409 B
ArmAsm
@ RUN: llvm-mc < %s -triple thumbv5-linux-gnueabi -filetype=obj -o - \
|
|
@ RUN: | llvm-readobj -r | FileCheck %s
|
|
.syntax unified
|
|
|
|
.text
|
|
.align 2
|
|
.globl main
|
|
.type main,%function
|
|
.thumb_func
|
|
main:
|
|
bl end
|
|
.space 8192
|
|
end:
|
|
bl main2
|
|
bx lr
|
|
|
|
.text
|
|
.align 2
|
|
.globl main2
|
|
.type main2,%function
|
|
.thumb_func
|
|
main2:
|
|
bx lr
|
|
|
|
@ CHECK-NOT: 0x0 R_ARM_THM_CALL end 0x0
|
|
@ CHECK: 0x2004 R_ARM_THM_CALL main2 0x0
|