mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-19 17:33:29 +00:00
ea3ab85c01
link.exe requires that the text section has the IMAGE_SCN_MEM_16BIT flag set. Otherwise, it will treat the function as ARM. If this occurs, then jumps to the function will fail, switching from thumb to ARM mode execution. With this change, it is possible to link using the MSVC linker as well. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210415 91177308-0d34-0410-b5e6-96231b3b80d8
31 lines
595 B
ArmAsm
31 lines
595 B
ArmAsm
@ RUN: llvm-mc -triple thumbv7-windows-itanium -filetype obj -o - %s \
|
|
@ RUN: | llvm-readobj -s - | FileCheck %s
|
|
|
|
.syntax unified
|
|
.thumb
|
|
|
|
.text
|
|
|
|
.def function
|
|
.type 32
|
|
.scl 2
|
|
.endef
|
|
.global function
|
|
.thumb_func
|
|
function:
|
|
bx lr
|
|
|
|
@ CHECK: Sections [
|
|
@ CHECK: Section {
|
|
@ CHECK: Name: .text
|
|
@ CHECK: Characteristics [
|
|
@ CHECK: IMAGE_SCN_ALIGN_4BYTES
|
|
@ CHECK: IMAGE_SCN_CNT_CODE
|
|
@ CHECK: IMAGE_SCN_MEM_16BIT
|
|
@ CHECK: IMAGE_SCN_MEM_EXECUTE
|
|
@ CHECK: IMAGE_SCN_MEM_PURGEABLE
|
|
@ CHECK: IMAGE_SCN_MEM_READ
|
|
@ CHECK: ]
|
|
@ CHECK: }
|
|
@ CHECK: ]
|