2015-07-28 07:27:03 +08:00
|
|
|
# REQUIRES: arm
|
|
|
|
|
2020-08-21 06:00:25 +08:00
|
|
|
# RUN: yaml2obj %s -o %t.obj
|
2020-03-16 08:47:44 +08:00
|
|
|
# RUN: llvm-objdump -d %t.obj | FileCheck %s --check-prefix BEFORE
|
2015-08-07 00:47:46 +08:00
|
|
|
# RUN: lld-link /out:%t.exe /subsystem:console /entry:get_function %t.obj
|
2020-03-16 08:47:44 +08:00
|
|
|
# RUN: llvm-objdump -d %t.exe | FileCheck %s --check-prefix AFTER
|
2015-07-25 11:03:46 +08:00
|
|
|
|
|
|
|
# BEFORE: Disassembly of section .text:
|
2019-05-01 18:40:48 +08:00
|
|
|
# BEFORE-EMPTY:
|
2015-07-25 11:03:46 +08:00
|
|
|
# BEFORE: 0: 70 47 bx lr
|
|
|
|
# BEFORE: 2: 00 bf nop
|
|
|
|
# BEFORE: 4: 40 f2 00 00 movw r0, #0
|
|
|
|
# BEFORE: 8: c0 f2 00 00 movt r0, #0
|
|
|
|
# BEFORE: c: 70 47 bx lr
|
|
|
|
|
|
|
|
# AFTER: Disassembly of section .text:
|
2019-05-01 18:40:48 +08:00
|
|
|
# AFTER-EMPTY:
|
2015-07-25 11:03:46 +08:00
|
|
|
# AFTER: 1000: 70 47 bx lr
|
|
|
|
# AFTER: 1002: 00 bf nop
|
|
|
|
# AFTER: 1004: 41 f2 01 00 movw r0, #4097
|
|
|
|
# AFTER: 1008: c0 f2 40 00 movt r0, #64
|
|
|
|
# AFTER: 100c: 70 47 bx lr
|
|
|
|
|
2016-06-28 04:17:08 +08:00
|
|
|
--- !COFF
|
2015-07-25 11:03:46 +08:00
|
|
|
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: 704700BF40F20000C0F200007047
|
|
|
|
Relocations:
|
|
|
|
- VirtualAddress: 4
|
|
|
|
SymbolName: function
|
2017-11-06 15:22:17 +08:00
|
|
|
Type: IMAGE_REL_ARM_MOV32T
|
2015-07-25 11:03:46 +08:00
|
|
|
symbols:
|
|
|
|
- Name: .text
|
|
|
|
Value: 0
|
|
|
|
SectionNumber: 1
|
|
|
|
SimpleType: IMAGE_SYM_TYPE_NULL
|
|
|
|
ComplexType: IMAGE_SYM_DTYPE_NULL
|
|
|
|
StorageClass: IMAGE_SYM_CLASS_STATIC
|
|
|
|
SectionDefinition:
|
|
|
|
Length: 14
|
|
|
|
NumberOfRelocations: 1
|
|
|
|
NumberOfLinenumbers: 0
|
|
|
|
CheckSum: 0
|
|
|
|
Number: 1
|
|
|
|
- Name: function
|
|
|
|
Value: 0
|
|
|
|
SectionNumber: 1
|
|
|
|
SimpleType: IMAGE_SYM_TYPE_NULL
|
|
|
|
ComplexType: IMAGE_SYM_DTYPE_FUNCTION
|
|
|
|
StorageClass: IMAGE_SYM_CLASS_EXTERNAL
|
|
|
|
- Name: get_function
|
|
|
|
Value: 4
|
|
|
|
SectionNumber: 1
|
|
|
|
SimpleType: IMAGE_SYM_TYPE_NULL
|
|
|
|
ComplexType: IMAGE_SYM_DTYPE_FUNCTION
|
|
|
|
StorageClass: IMAGE_SYM_CLASS_EXTERNAL
|
|
|
|
...
|