1# RUN: llvm-objcopy %p/Inputs/dynsym.so %t 2# RUN: llvm-readobj --dyn-symbols %t | FileCheck %s 3# RUN: llvm-readobj --sections %t | FileCheck --check-prefix=LINK %s 4 5#LINK: Name: .dynsym 6#LINK-NEXT: Type: SHT_DYNSYM 7#LINK-NEXT: Flags [ 8#LINK-NEXT: SHF_ALLOC 9#LINK-NEXT: ] 10#LINK-NEXT: Address: 11#LINK-NEXT: Offset: 12#LINK-NEXT: Size: 13#LINK-NEXT: Link: 3 14 15#LINK: Index: 3 16#LINK-NEXT: Name: .dynstr 17 18#CHECK: DynamicSymbols [ 19#CHECK-NEXT: Symbol { 20#CHECK-NEXT: Name: (0) 21#CHECK-NEXT: Value: 0x0 22#CHECK-NEXT: Size: 0 23#CHECK-NEXT: Binding: Local 24#CHECK-NEXT: Type: None (0x0) 25#CHECK-NEXT: Other: 0 26#CHECK-NEXT: Section: Undefined (0x0) 27#CHECK-NEXT: } 28#CHECK-NEXT: Symbol { 29#CHECK-NEXT: Name: bang (1) 30#CHECK-NEXT: Value: 0x4000 31#CHECK-NEXT: Size: 8 32#CHECK-NEXT: Binding: Global (0x1) 33#CHECK-NEXT: Type: Object (0x1) 34#CHECK-NEXT: Other: 0 35#CHECK-NEXT: Section: .bss (0x7) 36#CHECK-NEXT: } 37#CHECK-NEXT: Symbol { 38#CHECK-NEXT: Name: bar (6) 39#CHECK-NEXT: Value: 0x1001 40#CHECK-NEXT: Size: 0 41#CHECK-NEXT: Binding: Global (0x1) 42#CHECK-NEXT: Type: Function (0x2) 43#CHECK-NEXT: Other: 0 44#CHECK-NEXT: Section: .text (0x4) 45#CHECK-NEXT: } 46#CHECK-NEXT: Symbol { 47#CHECK-NEXT: Name: baz (10) 48#CHECK-NEXT: Value: 0x2000 49#CHECK-NEXT: Size: 0 50#CHECK-NEXT: Binding: Global (0x1) 51#CHECK-NEXT: Type: Object (0x1) 52#CHECK-NEXT: Other: 0 53#CHECK-NEXT: Section: .data (0x5) 54#CHECK-NEXT: } 55#CHECK-NEXT: Symbol { 56#CHECK-NEXT: Name: foo (14) 57#CHECK-NEXT: Value: 0x1000 58#CHECK-NEXT: Size: 0 59#CHECK-NEXT: Binding: Global (0x1) 60#CHECK-NEXT: Type: Function (0x2) 61#CHECK-NEXT: Other: 0 62#CHECK-NEXT: Section: .text (0x4) 63#CHECK-NEXT: } 64#CHECK-NEXT:] 65