1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
|
# REQUIRES: arm
# RUN: yaml2obj %s -o %t.obj
# RUN: llvm-objdump --no-print-imm-hex -d %t.obj | FileCheck %s --check-prefix BEFORE
# RUN: lld-link /entry:function /subsystem:console /out:%t.exe %t.obj
# RUN: llvm-objdump --no-print-imm-hex -d %t.exe | FileCheck %s --check-prefix AFTER
# BEFORE: Disassembly of section .text:
# BEFORE-EMPTY:
# BEFORE: 0: 4770 bx lr
# BEFORE: 2: bf00 nop
# BEFORE: 4: e92d 4800 push.w {r11, lr}
# BEFORE: 8: 46eb mov r11, sp
# BEFORE: a: 2020 movs r0, #32
# BEFORE: c: f000 f800 bl {{.+}} @ imm = #0
# BEFORE: 10: 3001 adds r0, #1
# BEFORE: 12: e8bd 8800 pop.w {r11, pc}
# AFTER: Disassembly of section .text:
# AFTER-EMPTY:
# AFTER: 401000: 4770 bx lr
# AFTER: 401002: bf00 nop
# AFTER: 401004: e92d 4800 push.w {r11, lr}
# AFTER: 401008: 46eb mov r11, sp
# AFTER: 40100a: 2020 movs r0, #32
# AFTER: 40100c: f7ff fff8 bl 0x401000 <.text>
# AFTER: 401010: 3001 adds r0, #1
# AFTER: 401012: e8bd 8800 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
...
|