1 RUN: llvm-readelf --symbols %p/Inputs/symbols-proc-specific.elf-hexagon \
2 RUN: | FileCheck %s --check-prefix ELF32
3 RUN: llvm-readelf --symbols %p/Inputs/relocs.obj.elf-x86_64 \
4 RUN: | FileCheck %s --check-prefix ELF64
5 RUN: llvm-readelf --symbols %p/Inputs/gnuhash.so.elf-x86_64 \
6 RUN: | FileCheck %s --check-prefixes=SYMTAB,DYN
7 RUN: llvm-readelf --dyn-symbols %p/Inputs/gnuhash.so.elf-x86_64 \
8 RUN: | FileCheck %s --check-prefixes=NO-SYMTAB,DYN
9 RUN: llvm-readelf --symbols --dyn-symbols %p/Inputs/gnuhash.so.elf-x86_64 \
10 RUN: | FileCheck %s --check-prefixes=SYMTAB,DYN
12 ELF32: Symbol table '.symtab' contains 5 entries:
13 ELF32-NEXT: Num: Value Size Type Bind Vis Ndx Name
14 ELF32-NEXT: 0: 00000000 0 NOTYPE LOCAL DEFAULT UND
15 ELF32-NEXT: 1: 00000000 0 FILE LOCAL DEFAULT ABS a.c
16 ELF32-NEXT: 2: 00000000 20 FUNC GLOBAL DEFAULT 2 main
17 ELF32-NEXT: 3: 00000004 4 OBJECT GLOBAL DEFAULT PRC[0xff03] x
18 ELF32-NEXT: 4: 00000000 4 OBJECT GLOBAL DEFAULT 3 y
20 ELF64: Symbol table '.symtab' contains 6 entries:
21 ELF64-NEXT: Num: Value Size Type Bind Vis Ndx Name
22 ELF64-NEXT: 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
23 ELF64-NEXT: 1: 0000000000000000 0 SECTION LOCAL DEFAULT 1 .text
24 ELF64-NEXT: 2: 0000000000000000 0 SECTION LOCAL DEFAULT 3 .data
25 ELF64-NEXT: 3: 0000000000000000 0 SECTION LOCAL DEFAULT 4 .bss
26 ELF64-NEXT: 4: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND _GLOBAL_OFFSET_TABLE_
27 ELF64-NEXT: 5: 0000000000000000 0 TLS GLOBAL DEFAULT UND sym
29 NO-SYMTAB-NOT: Symbol table '.symtab'
31 DYN: Symbol table '.dynsym' contains 5 entries:
32 DYN-NEXT: Num: Value Size Type Bind Vis Ndx Name
33 DYN-NEXT: 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
34 DYN-NEXT: 1: 00000000000001b8 0 NOTYPE GLOBAL DEFAULT 4 foo
35 DYN-NEXT: 2: 0000000000200268 0 NOTYPE GLOBAL DEFAULT 5 _edata
36 DYN-NEXT: 3: 0000000000200268 0 NOTYPE GLOBAL DEFAULT 5 _end
37 DYN-NEXT: 4: 0000000000200268 0 NOTYPE GLOBAL DEFAULT 5 __bss_start
40 NO-SYMTAB-NOT: Symbol table '.symtab'
42 SYMTAB: Symbol table '.symtab' contains 12 entries:
43 SYMTAB-NEXT: Num: Value Size Type Bind Vis Ndx Name
44 SYMTAB-NEXT: 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
45 SYMTAB-NEXT: 1: 00000000000000e8 0 SECTION LOCAL DEFAULT 1 .gnu.hash
46 SYMTAB-NEXT: 2: 0000000000000120 0 SECTION LOCAL DEFAULT 2 .dynsym
47 SYMTAB-NEXT: 3: 0000000000000198 0 SECTION LOCAL DEFAULT 3 .dynstr
48 SYMTAB-NEXT: 4: 00000000000001b8 0 SECTION LOCAL DEFAULT 4 .eh_frame
49 SYMTAB-NEXT: 5: 00000000002001b8 0 SECTION LOCAL DEFAULT 5 .dynamic
50 SYMTAB-NEXT: 6: 00000000002001b8 0 OBJECT LOCAL DEFAULT 5 _DYNAMIC
51 SYMTAB-NEXT: 7: 0000000000200268 0 OBJECT LOCAL DEFAULT 5 _GLOBAL_OFFSET_TABLE_
52 SYMTAB-NEXT: 8: 0000000000200268 0 NOTYPE GLOBAL DEFAULT 5 __bss_start
53 SYMTAB-NEXT: 9: 00000000000001b8 0 NOTYPE GLOBAL DEFAULT 4 foo
54 SYMTAB-NEXT: 10: 0000000000200268 0 NOTYPE GLOBAL DEFAULT 5 _edata
55 SYMTAB-NEXT: 11: 0000000000200268 0 NOTYPE GLOBAL DEFAULT 5 _end