3 # RUN: yaml2obj %s -o %t.obj
4 # RUN: llvm-objdump --no-print-imm-hex -d %t.obj | FileCheck %s --check-prefix BEFORE
5 # RUN: lld-link /entry:main /subsystem:console /out:%t.exe %t.obj %p/Inputs/library-arm64.lib %p/Inputs/library2-arm64.lib
6 # RUN: llvm-objdump --no-print-imm-hex -d %t.exe | FileCheck %s --check-prefix AFTER
7 # RUN: llvm-readobj --coff-imports %t.exe | FileCheck %s -check-prefix IMPORTS
9 # BEFORE: Disassembly of section .text:
11 # BEFORE: 0: 94000000 bl 0x0
12 # BEFORE: 4: 94000000 bl 0x4
13 # BEFORE: 8: d65f03c0 ret
14 # BEFORE: c: ff <unknown>
16 # AFTER: Disassembly of section .text:
18 # AFTER: 140001000: 94000004 bl 0x140001010
19 # AFTER: 140001004: 94000006 bl 0x14000101c
20 # AFTER: 140001008: d65f03c0 ret
21 # AFTER: 14000100c: 000000ff
22 # AFTER: 140001010: b0000010 adrp x16, 0x140002000
23 # AFTER: 140001014: f9403210 ldr x16, [x16, #96]
24 # AFTER: 140001018: d61f0200 br x16
25 # AFTER: 14000101c: b0000010 adrp x16, 0x140002000
26 # AFTER: 140001020: f9403a10 ldr x16, [x16, #112]
27 # AFTER: 140001024: d61f0200 br x16
30 # IMPORTS: Name: library.dll
31 # IMPORTS: ImportLookupTableRVA: 0x2040
32 # IMPORTS: ImportAddressTableRVA: 0x2060
33 # IMPORTS: Symbol: function (2)
36 # IMPORTS: Name: library2.dll
37 # IMPORTS: ImportLookupTableRVA: 0x2050
38 # IMPORTS: ImportAddressTableRVA: 0x2070
39 # IMPORTS: Symbol: function2 (0)
44 Machine: IMAGE_FILE_MACHINE_ARM64
48 Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
50 SectionData: 0000009400000094C0035FD6FF
54 Type: IMAGE_REL_ARM64_BRANCH26
57 Type: IMAGE_REL_ARM64_BRANCH26
62 SimpleType: IMAGE_SYM_TYPE_NULL
63 ComplexType: IMAGE_SYM_DTYPE_NULL
64 StorageClass: IMAGE_SYM_CLASS_STATIC
67 NumberOfRelocations: 2
68 NumberOfLinenumbers: 0
74 SimpleType: IMAGE_SYM_TYPE_NULL
75 ComplexType: IMAGE_SYM_DTYPE_NULL
76 StorageClass: IMAGE_SYM_CLASS_EXTERNAL
80 SimpleType: IMAGE_SYM_TYPE_NULL
81 ComplexType: IMAGE_SYM_DTYPE_NULL
82 StorageClass: IMAGE_SYM_CLASS_EXTERNAL
86 SimpleType: IMAGE_SYM_TYPE_NULL
87 ComplexType: IMAGE_SYM_DTYPE_NULL
88 StorageClass: IMAGE_SYM_CLASS_EXTERNAL