1 ## Test how --syms/-t prints the static symbol table.
2 # RUN: yaml2obj --docnum=1 %s -o %t
3 # RUN: llvm-objdump --syms %t > %t.txt
4 # RUN: llvm-objdump -t %t | cmp - %t.txt
5 # RUN: FileCheck %s --input-file=%t.txt --match-full-lines --strict-whitespace
7 # CHECK:{{.*}}file format elf64-x86-64
9 # CHECK-NEXT:SYMBOL TABLE:
10 # CHECK-NEXT:0000000000000000 l df *ABS* 0000000000000000 a.c
11 # CHECK-NEXT:0000000000000000 l d .text 0000000000000000 .text
12 # CHECK-NEXT:0000000000002000 l O .data 0000000000000000 local_object
13 # CHECK-NEXT:0000000000001fff l F .text 0000000000000000 local_func
14 # CHECK-NEXT:0000000000000000 l *ABS* 0000000000000000 local_abs
15 # CHECK-NEXT:0000000000000000 g .data 0000000000000000 notype
16 # CHECK-NEXT:0000000000000000 g O .data 0000000000000010 object
17 # CHECK-NEXT:0000000000000000 g F .text 000000000000000f func
18 # CHECK-NEXT:0000000000000000 g O *COM* 0000000000000000 common
19 # CHECK-NEXT:0000000000000000 g .data 0000000000000000 tls
20 # CHECK-NEXT:0000000000000000 g i .text 0000000000000000 ifunc
21 # CHECK-NEXT:0000000000000000 g .text 0000000000000000 invalid_type
22 # CHECK-NEXT:0000000000000000 g .text 0000000000000000 STT_HIOS
23 # CHECK-NEXT:0000000000000000 g .text 0000000000000000 STT_LOPROC
24 # CHECK-NEXT:0000000000000000 *UND* 0000000000000000 undef
25 # CHECK-NEXT:0000000000000000 *UND* 0000000000000000 SHN_LOPROC
26 # CHECK-NEXT:0000000000000000 *UND* 0000000000000000 SHN_LOOS
27 # CHECK-NEXT:0000000000000000 *UND* 0000000000000000 reserve
28 # CHECK-NEXT:0000000000000000 g *ABS* 0000000000000000 abs
29 # CHECK-NEXT:0000000000000000 *COM* 0000000000000000 common2
30 # CHECK-NEXT:0000000000000000 u O .data 0000000000000000 gnu_unique
31 # CHECK-NEXT:0000000000000000 g .data 0000000000000000 invalid_binding
32 # CHECK-NEXT:0000000000000000 g .data 0000000000000000 STB_HIOS
33 # CHECK-NEXT:0000000000000000 g .data 0000000000000000 STB_LOPROC
118 Binding: STB_GNU_UNIQUE
120 - Name: invalid_binding
130 ## For an ELF32 object, print the address and size fields as 32-bit hexadecimals.
131 # RUN: yaml2obj --docnum=2 -D BITS=32 %s -o %t.32
132 # RUN: llvm-objdump --syms %t.32 | FileCheck --check-prefix=ELF32 %s --match-full-lines --strict-whitespace
133 ## For an ELF64 object, print the address and size fields as 64-bit hexadecimals.
134 # RUN: yaml2obj --docnum=2 -D BITS=64 %s -o %t.64
135 # RUN: llvm-objdump --syms %t.64 | FileCheck --check-prefix=ELF64 %s --match-full-lines --strict-whitespace
137 # ELF32:SYMBOL TABLE:
138 # ELF32-NEXT:00000000 *UND* 00000000 sym
140 # ELF64:SYMBOL TABLE:
141 # ELF64-NEXT:0000000000000000 *UND* 0000000000000000 sym
145 Class: ELFCLASS[[BITS]]