| # 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: 2020 movs r0, #32 |
| # BEFORE: 6: f000 b800 b.w {{.+}} @ imm = #0 |
| |
| # AFTER: Disassembly of section .text: |
| # AFTER-EMPTY: |
| # AFTER: <.text>: |
| # AFTER: 401000: 4770 bx lr |
| # AFTER: 401002: bf00 nop |
| # AFTER: 401004: 2020 movs r0, #32 |
| # AFTER: 401006: f7ff bffb b.w 0x401000 <.text> |
| |
| --- !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: 704700BF202000F000B8 |
| Relocations: |
| - VirtualAddress: 6 |
| SymbolName: identity |
| Type: IMAGE_REL_ARM_BRANCH24T |
| symbols: |
| - Name: .text |
| Value: 0 |
| SectionNumber: 1 |
| SimpleType: IMAGE_SYM_TYPE_NULL |
| ComplexType: IMAGE_SYM_DTYPE_NULL |
| StorageClass: IMAGE_SYM_CLASS_STATIC |
| SectionDefinition: |
| Length: 10 |
| 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 |
| ... |