forked from OSchip/llvm-project
69 lines
2.3 KiB
Plaintext
69 lines
2.3 KiB
Plaintext
# REQUIRES: arm
|
|
|
|
# RUN: yaml2obj %s -o %t.obj
|
|
# RUN: llvm-objdump -d %t.obj | FileCheck %s --check-prefix BEFORE
|
|
# RUN: lld-link /entry:function /subsystem:console /out:%t.exe %t.obj
|
|
# RUN: llvm-objdump -d %t.exe | FileCheck %s --check-prefix AFTER
|
|
|
|
# BEFORE: Disassembly of section .text:
|
|
# BEFORE-EMPTY:
|
|
# BEFORE: 0: 70 47 bx lr
|
|
# BEFORE: 2: 00 bf nop
|
|
# BEFORE: 4: 2d e9 00 48 push.w {r11, lr}
|
|
# BEFORE: 8: eb 46 mov r11, sp
|
|
# BEFORE: a: 20 20 movs r0, #32
|
|
# BEFORE: c: 00 f0 00 f8 bl {{.+}} @ imm = #0
|
|
# BEFORE: 10: 01 30 adds r0, #1
|
|
# BEFORE: 12: bd e8 00 88 pop.w {r11, pc}
|
|
|
|
# AFTER: Disassembly of section .text:
|
|
# AFTER-EMPTY:
|
|
# AFTER: 401000: 70 47 bx lr
|
|
# AFTER: 401002: 00 bf nop
|
|
# AFTER: 401004: 2d e9 00 48 push.w {r11, lr}
|
|
# AFTER: 401008: eb 46 mov r11, sp
|
|
# AFTER: 40100a: 20 20 movs r0, #32
|
|
# AFTER: 40100c: ff f7 f8 ff bl 0x401000 <.text>
|
|
# AFTER: 401010: 01 30 adds r0, #1
|
|
# AFTER: 401012: bd e8 00 88 pop.w {r11, pc}
|
|
|
|
--- !COFF
|
|
header:
|
|
Machine: IMAGE_FILE_MACHINE_ARMNT
|
|
Characteristics: [ ]
|
|
sections:
|
|
- Name: .text
|
|
Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_PURGEABLE, IMAGE_SCN_MEM_16BIT, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
|
|
Alignment: 4
|
|
SectionData: 704700BF2DE90048EB46202000F000F80130BDE80088
|
|
Relocations:
|
|
- VirtualAddress: 12
|
|
SymbolName: identity
|
|
Type: IMAGE_REL_ARM_BLX23T
|
|
symbols:
|
|
- Name: .text
|
|
Value: 0
|
|
SectionNumber: 1
|
|
SimpleType: IMAGE_SYM_TYPE_NULL
|
|
ComplexType: IMAGE_SYM_DTYPE_NULL
|
|
StorageClass: IMAGE_SYM_CLASS_STATIC
|
|
SectionDefinition:
|
|
Length: 22
|
|
NumberOfRelocations: 1
|
|
NumberOfLinenumbers: 0
|
|
CheckSum: 0
|
|
Number: 1
|
|
- Name: identity
|
|
Value: 0
|
|
SectionNumber: 1
|
|
SimpleType: IMAGE_SYM_TYPE_NULL
|
|
ComplexType: IMAGE_SYM_DTYPE_FUNCTION
|
|
StorageClass: IMAGE_SYM_CLASS_EXTERNAL
|
|
- Name: function
|
|
Value: 4
|
|
SectionNumber: 1
|
|
SimpleType: IMAGE_SYM_TYPE_NULL
|
|
ComplexType: IMAGE_SYM_DTYPE_FUNCTION
|
|
StorageClass: IMAGE_SYM_CLASS_EXTERNAL
|
|
...
|