• 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:get_buffer /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: 40 f2 00 00   movw r0, #0
11# BEFORE:        4: c0 f2 00 00   movt r0, #0
12# BEFORE:        8: 70 47         bx lr
13
14# AFTER: Disassembly of section .text:
15# AFTER-EMPTY:
16# AFTER:        0: 42 f2 00 00   movw r0, #8192
17# AFTER:        4: c0 f2 40 00   movt r0, #64
18# AFTER:        8: 70 47         bx lr
19
20--- !COFF
21header:
22  Machine:         IMAGE_FILE_MACHINE_ARMNT
23  Characteristics: [  ]
24sections:
25  - Name:            .text
26    Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_PURGEABLE, IMAGE_SCN_MEM_16BIT, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
27    Alignment:       4
28    SectionData:     40F20000C0F200007047
29    Relocations:
30      - VirtualAddress:  0
31        SymbolName:      buffer
32        Type:            IMAGE_REL_ARM_MOV32T
33  - Name:            .rdata
34    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
35    Alignment:       1
36    SectionData:     '62756666657200'
37symbols:
38  - Name:            .text
39    Value:           0
40    SectionNumber:   1
41    SimpleType:      IMAGE_SYM_TYPE_NULL
42    ComplexType:     IMAGE_SYM_DTYPE_NULL
43    StorageClass:    IMAGE_SYM_CLASS_STATIC
44    SectionDefinition:
45      Length:          10
46      NumberOfRelocations: 1
47      NumberOfLinenumbers: 0
48      CheckSum:        0
49      Number:          1
50  - Name:            .rdata
51    Value:           0
52    SectionNumber:   2
53    SimpleType:      IMAGE_SYM_TYPE_NULL
54    ComplexType:     IMAGE_SYM_DTYPE_NULL
55    StorageClass:    IMAGE_SYM_CLASS_STATIC
56    SectionDefinition:
57      Length:          7
58      NumberOfRelocations: 0
59      NumberOfLinenumbers: 0
60      CheckSum:        0
61      Number:          2
62  - Name:            get_buffer
63    Value:           0
64    SectionNumber:   1
65    SimpleType:      IMAGE_SYM_TYPE_NULL
66    ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
67    StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
68  - Name:            buffer
69    Value:           0
70    SectionNumber:   2
71    SimpleType:      IMAGE_SYM_TYPE_NULL
72    ComplexType:     IMAGE_SYM_DTYPE_NULL
73    StorageClass:    IMAGE_SYM_CLASS_STATIC
74...
75