1# REQUIRES: system-linker-mach-o 2# 3# RUN: not ld64.lld -arch x86_64 -macosx_version_min 10.8 %s \ 4# RUN: -dylib -o %t %p/Inputs/x86_64/libSystem.yaml 2> %t.err 5# RUN: FileCheck %s < %t.err 6# 7# RUN: not ld64.lld -arch x86_64 -macosx_version_min 10.8 %s \ 8# RUN: -dylib -o %t %p/Inputs/x86_64/libSystem.yaml -demangle 2> %t.err2 9# RUN: FileCheck %s --check-prefix=DCHECK < %t.err2 10# 11# Test -demangle option works on undefined symbol errors. 12# 13 14--- !mach-o 15arch: x86_64 16file-type: MH_OBJECT 17flags: [ MH_SUBSECTIONS_VIA_SYMBOLS ] 18sections: 19 - segment: __TEXT 20 section: __text 21 type: S_REGULAR 22 attributes: [ S_ATTR_PURE_INSTRUCTIONS, S_ATTR_SOME_INSTRUCTIONS ] 23 address: 0x0000000000000000 24 content: [ 0xE8, 0x00, 0x00, 0x00, 0x00, 0xE8, 0x00, 0x00, 25 0x00, 0x00, 0xE8, 0x00, 0x00, 0x00, 0x00 ] 26 relocations: 27 - offset: 0x0000000B 28 type: X86_64_RELOC_BRANCH 29 length: 2 30 pc-rel: true 31 extern: true 32 symbol: 2 33 - offset: 0x00000006 34 type: X86_64_RELOC_BRANCH 35 length: 2 36 pc-rel: true 37 extern: true 38 symbol: 3 39 - offset: 0x00000001 40 type: X86_64_RELOC_BRANCH 41 length: 2 42 pc-rel: true 43 extern: true 44 symbol: 1 45global-symbols: 46 - name: __Z1xv 47 type: N_SECT 48 scope: [ N_EXT ] 49 sect: 1 50 value: 0x0000000000000000 51undefined-symbols: 52 - name: __Znam 53 type: N_UNDF 54 scope: [ N_EXT ] 55 value: 0x0000000000000000 56 - name: __Znotcpp 57 type: N_UNDF 58 scope: [ N_EXT ] 59 value: 0x0000000000000000 60 - name: _foo 61 type: N_UNDF 62 scope: [ N_EXT ] 63 value: 0x0000000000000000 64 65... 66 67# CHECK: __Znotcpp 68# CHECK: __Znam 69# CHECK: _foo 70 71# DCHECK: __Znotcpp 72# DCHECK: operator new[](unsigned long) 73# DCHECK: _foo 74 75