diff --git a/lld/test/MachO/symtab.s b/lld/test/MachO/symtab.s --- a/lld/test/MachO/symtab.s +++ b/lld/test/MachO/symtab.s @@ -6,107 +6,107 @@ # RUN: %lld -dylib %t/libfoo.o -o %t/libfoo.dylib # RUN: %lld -lSystem %t/test.o %t/test2.o %t/libfoo.dylib -o %t/test -# RUN: llvm-readobj --syms --macho-dysymtab %t/test | FileCheck %s +# RUN: llvm-readobj --syms --sort-symbols --macho-dysymtab %t/test | FileCheck %s # CHECK: Symbols [ # CHECK-NEXT: Symbol { -# CHECK-NEXT: Name: _local +# CHECK-NEXT: Name: __dyld_private (9) # CHECK-NEXT: Type: Section (0xE) -# CHECK-NEXT: Section: __data +# CHECK-NEXT: Section: __data (0x6) # CHECK-NEXT: RefType: UndefinedNonLazy (0x0) # CHECK-NEXT: Flags [ (0x0) # CHECK-NEXT: ] -# CHECK-NEXT: Value: 0x1{{[0-9a-f]*}} +# CHECK-NEXT: Value: 0x100002010 # CHECK-NEXT: } # CHECK-NEXT: Symbol { -# CHECK-NEXT: Name: __dyld_private +# CHECK-NEXT: Name: __mh_execute_header (122) +# CHECK-NEXT: Extern # CHECK-NEXT: Type: Section (0xE) -# CHECK-NEXT: Section: __data +# CHECK-NEXT: Section: __text (0x1) # CHECK-NEXT: RefType: UndefinedNonLazy (0x0) -# CHECK-NEXT: Flags [ (0x0) +# CHECK-NEXT: Flags [ (0x10) +# CHECK-NEXT: ReferencedDynamically (0x10) # CHECK-NEXT: ] -# CHECK-NEXT: Value: 0x1{{[0-9a-f]*}} +# CHECK-NEXT: Value: 0x100000000 # CHECK-NEXT: } # CHECK-NEXT: Symbol { -# CHECK-NEXT: Name: _private_external -# CHECK-NEXT: PrivateExtern -# CHECK-NEXT: Type: Section (0xE) -# CHECK-NEXT: Section: __text (0x1) +# CHECK-NEXT: Name: _dynamic (113) +# CHECK-NEXT: Extern +# CHECK-NEXT: Type: Undef (0x0) +# CHECK-NEXT: Section: (0x0) # CHECK-NEXT: RefType: UndefinedNonLazy (0x0) -# CHECK-NEXT: Flags [ (0x0) +# CHECK-NEXT: Flags [ (0x200) +# CHECK-NEXT: AltEntry (0x200) # CHECK-NEXT: ] -# CHECK-NEXT: Value: 0x1{{[0-9a-f]*}} +# CHECK-NEXT: Value: 0x0 # CHECK-NEXT: } # CHECK-NEXT: Symbol { -# CHECK-NEXT: Name: _private_external_weak -# CHECK-NEXT: PrivateExtern +# CHECK-NEXT: Name: _external (103) +# CHECK-NEXT: Extern # CHECK-NEXT: Type: Section (0xE) -# CHECK-NEXT: Section: __text (0x1) +# CHECK-NEXT: Section: __data (0x6) # CHECK-NEXT: RefType: UndefinedNonLazy (0x0) # CHECK-NEXT: Flags [ (0x0) # CHECK-NEXT: ] -# CHECK-NEXT: Value: 0x1{{[0-9a-f]*}} +# CHECK-NEXT: Value: 0x100002008 # CHECK-NEXT: } # CHECK-NEXT: Symbol { -# CHECK-NEXT: Name: _main +# CHECK-NEXT: Name: _external_weak (47) # CHECK-NEXT: Extern # CHECK-NEXT: Type: Section (0xE) # CHECK-NEXT: Section: __text (0x1) # CHECK-NEXT: RefType: UndefinedNonLazy (0x0) -# CHECK-NEXT: Flags [ (0x0) +# CHECK-NEXT: Flags [ (0x80) +# CHECK-NEXT: WeakDef (0x80) # CHECK-NEXT: ] -# CHECK-NEXT: Value: 0x1{{[0-9a-f]*}} +# CHECK-NEXT: Value: 0x100000568 # CHECK-NEXT: } # CHECK-NEXT: Symbol { -# CHECK-NEXT: Name: _external_weak -# CHECK-NEXT: Extern +# CHECK-NEXT: Name: _local (2) # CHECK-NEXT: Type: Section (0xE) -# CHECK-NEXT: Section: __text (0x1) +# CHECK-NEXT: Section: __data (0x6) # CHECK-NEXT: RefType: UndefinedNonLazy (0x0) -# CHECK-NEXT: Flags [ (0x80) -# CHECK-NEXT: WeakDef (0x80) +# CHECK-NEXT: Flags [ (0x0) # CHECK-NEXT: ] -# CHECK-NEXT: Value: 0x1{{[0-9a-f]*}} +# CHECK-NEXT: Value: 0x100002009 # CHECK-NEXT: } # CHECK-NEXT: Symbol { -# CHECK-NEXT: Name: _external +# CHECK-NEXT: Name: _main (24) # CHECK-NEXT: Extern # CHECK-NEXT: Type: Section (0xE) -# CHECK-NEXT: Section: __data +# CHECK-NEXT: Section: __text (0x1) # CHECK-NEXT: RefType: UndefinedNonLazy (0x0) # CHECK-NEXT: Flags [ (0x0) # CHECK-NEXT: ] -# CHECK-NEXT: Value: 0x1{{[0-9a-f]*}} +# CHECK-NEXT: Value: 0x10000056B # CHECK-NEXT: } # CHECK-NEXT: Symbol { -# CHECK-NEXT: Name: __mh_execute_header -# CHECK-NEXT: Extern +# CHECK-NEXT: Name: _private_external (62) +# CHECK-NEXT: PrivateExtern # CHECK-NEXT: Type: Section (0xE) # CHECK-NEXT: Section: __text (0x1) # CHECK-NEXT: RefType: UndefinedNonLazy (0x0) -# CHECK-NEXT: Flags [ (0x10) -# CHECK-NEXT: ReferencedDynamically (0x10) +# CHECK-NEXT: Flags [ (0x0) # CHECK-NEXT: ] -# CHECK-NEXT: Value: 0x100000000 +# CHECK-NEXT: Value: 0x100000569 # CHECK-NEXT: } # CHECK-NEXT: Symbol { -# CHECK-NEXT: Name: dyld_stub_binder -# CHECK-NEXT: Extern -# CHECK-NEXT: Type: Undef (0x0) -# CHECK-NEXT: Section: (0x0) +# CHECK-NEXT: Name: _private_external_weak (80) +# CHECK-NEXT: PrivateExtern +# CHECK-NEXT: Type: Section (0xE) +# CHECK-NEXT: Section: __text (0x1) # CHECK-NEXT: RefType: UndefinedNonLazy (0x0) -# CHECK-NEXT: Flags [ (0x100) -# CHECK-NEXT: SymbolResolver (0x100) +# CHECK-NEXT: Flags [ (0x0) # CHECK-NEXT: ] -# CHECK-NEXT: Value: 0x0 +# CHECK-NEXT: Value: 0x10000056A # CHECK-NEXT: } # CHECK-NEXT: Symbol { -# CHECK-NEXT: Name: _dynamic +# CHECK-NEXT: Name: dyld_stub_binder (30) # CHECK-NEXT: Extern # CHECK-NEXT: Type: Undef (0x0) # CHECK-NEXT: Section: (0x0) # CHECK-NEXT: RefType: UndefinedNonLazy (0x0) -# CHECK-NEXT: Flags [ (0x200) -# CHECK-NEXT: AltEntry (0x200) +# CHECK-NEXT: Flags [ (0x100) +# CHECK-NEXT: SymbolResolver (0x100) # CHECK-NEXT: ] # CHECK-NEXT: Value: 0x0 # CHECK-NEXT: }