• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# REQUIRES: arm
2
3# RUN: yaml2obj %s -o %t.obj
4# RUN: llvm-objdump -d %t.obj | FileCheck %s --check-prefix BEFORE
5# RUN: lld-link /entry:function /subsystem:console /out:%t.exe %t.obj
6# RUN: llvm-objdump -d %t.exe | FileCheck %s --check-prefix AFTER
7
8# BEFORE: Disassembly of section .text:
9# BEFORE-EMPTY:
10# BEFORE:        0: 70 47         bx lr
11# BEFORE:        2: 00 bf         nop
12# BEFORE:        4: 2d e9 00 48   push.w {r11, lr}
13# BEFORE:        8: eb 46         mov r11, sp
14# BEFORE:        a: 20 20         movs r0, #32
15# BEFORE:        c: 00 f0 00 f8   bl #0
16# BEFORE:       10: 01 30         adds r0, #1
17# BEFORE:       12: bd e8 00 88   pop.w {r11, pc}
18
19# AFTER: Disassembly of section .text:
20# AFTER-EMPTY:
21# AFTER:     1000: 70 47         bx lr
22# AFTER:     1002: 00 bf         nop
23# AFTER:     1004: 2d e9 00 48   push.w {r11, lr}
24# AFTER:     1008: eb 46         mov r11, sp
25# AFTER:     100a: 20 20         movs r0, #32
26# AFTER:     100c: ff f7 f8 ff   bl #-16
27# AFTER:     1010: 01 30         adds r0, #1
28# AFTER:     1012: bd e8 00 88   pop.w {r11, pc}
29
30--- !COFF
31header:
32  Machine:         IMAGE_FILE_MACHINE_ARMNT
33  Characteristics: [  ]
34sections:
35  - Name:            .text
36    Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_PURGEABLE, IMAGE_SCN_MEM_16BIT, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
37    Alignment:       4
38    SectionData:     704700BF2DE90048EB46202000F000F80130BDE80088
39    Relocations:
40      - VirtualAddress:  12
41        SymbolName:      identity
42        Type:            IMAGE_REL_ARM_BLX23T
43symbols:
44  - Name:            .text
45    Value:           0
46    SectionNumber:   1
47    SimpleType:      IMAGE_SYM_TYPE_NULL
48    ComplexType:     IMAGE_SYM_DTYPE_NULL
49    StorageClass:    IMAGE_SYM_CLASS_STATIC
50    SectionDefinition:
51      Length:          22
52      NumberOfRelocations: 1
53      NumberOfLinenumbers: 0
54      CheckSum:        0
55      Number:          1
56  - Name:            identity
57    Value:           0
58    SectionNumber:   1
59    SimpleType:      IMAGE_SYM_TYPE_NULL
60    ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
61    StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
62  - Name:            function
63    Value:           4
64    SectionNumber:   1
65    SimpleType:      IMAGE_SYM_TYPE_NULL
66    ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
67    StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
68...
69