1# REQUIRES: aarch64 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:main /subsystem:console /out:%t.exe %t.obj %p/Inputs/library-arm64.lib %p/Inputs/library2-arm64.lib 6# RUN: llvm-objdump -d %t.exe | FileCheck %s --check-prefix AFTER 7# RUN: llvm-readobj --coff-imports %t.exe | FileCheck %s -check-prefix IMPORTS 8 9# BEFORE: Disassembly of section .text: 10# BEFORE-EMPTY: 11# BEFORE: 0: 00 00 00 94 bl 0x0 12# BEFORE: 4: 00 00 00 94 bl 0x4 13# BEFORE: 8: c0 03 5f d6 ret 14# BEFORE: c: ff <unknown> 15 16# AFTER: Disassembly of section .text: 17# AFTER-EMPTY: 18# AFTER: 140001000: 04 00 00 94 bl 0x140001010 19# AFTER: 140001004: 06 00 00 94 bl 0x14000101c 20# AFTER: 140001008: c0 03 5f d6 ret 21# AFTER: 14000100c: ff cc cc cc <unknown> 22# AFTER: 140001010: 10 00 00 b0 adrp x16, #4096 23# AFTER: 140001014: 10 32 40 f9 ldr x16, [x16, #96] 24# AFTER: 140001018: 00 02 1f d6 br x16 25# AFTER: 14000101c: 10 00 00 b0 adrp x16, #4096 26# AFTER: 140001020: 10 3a 40 f9 ldr x16, [x16, #112] 27# AFTER: 140001024: 00 02 1f d6 br x16 28 29# IMPORTS: Import { 30# IMPORTS: Name: library.dll 31# IMPORTS: ImportLookupTableRVA: 0x2040 32# IMPORTS: ImportAddressTableRVA: 0x2060 33# IMPORTS: Symbol: function (2) 34# IMPORTS: } 35# IMPORTS: Import { 36# IMPORTS: Name: library2.dll 37# IMPORTS: ImportLookupTableRVA: 0x2050 38# IMPORTS: ImportAddressTableRVA: 0x2070 39# IMPORTS: Symbol: function2 (0) 40# IMPORTS: } 41 42--- !COFF 43header: 44 Machine: IMAGE_FILE_MACHINE_ARM64 45 Characteristics: [ ] 46sections: 47 - Name: .text 48 Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ] 49 Alignment: 4 50 SectionData: 0000009400000094C0035FD6FF 51 Relocations: 52 - VirtualAddress: 0 53 SymbolName: function 54 Type: IMAGE_REL_ARM64_BRANCH26 55 - VirtualAddress: 4 56 SymbolName: function2 57 Type: IMAGE_REL_ARM64_BRANCH26 58symbols: 59 - Name: .text 60 Value: 0 61 SectionNumber: 1 62 SimpleType: IMAGE_SYM_TYPE_NULL 63 ComplexType: IMAGE_SYM_DTYPE_NULL 64 StorageClass: IMAGE_SYM_CLASS_STATIC 65 SectionDefinition: 66 Length: 12 67 NumberOfRelocations: 2 68 NumberOfLinenumbers: 0 69 CheckSum: 1438860354 70 Number: 1 71 - Name: main 72 Value: 0 73 SectionNumber: 1 74 SimpleType: IMAGE_SYM_TYPE_NULL 75 ComplexType: IMAGE_SYM_DTYPE_NULL 76 StorageClass: IMAGE_SYM_CLASS_EXTERNAL 77 - Name: function 78 Value: 0 79 SectionNumber: 0 80 SimpleType: IMAGE_SYM_TYPE_NULL 81 ComplexType: IMAGE_SYM_DTYPE_NULL 82 StorageClass: IMAGE_SYM_CLASS_EXTERNAL 83 - Name: function2 84 Value: 0 85 SectionNumber: 0 86 SimpleType: IMAGE_SYM_TYPE_NULL 87 ComplexType: IMAGE_SYM_DTYPE_NULL 88 StorageClass: IMAGE_SYM_CLASS_EXTERNAL 89... 90