1 ## Test that llvm-objdump can dump dynamic symbols.
2 # RUN: yaml2obj --docnum=1 %s -o %t1
3 # RUN: llvm-objdump --dynamic-syms %t1 | \
4 # RUN: FileCheck %s --match-full-lines --strict-whitespace --check-prefix=DYNSYM
5 # RUN: llvm-objdump -T %t1 | \
6 # RUN: FileCheck %s --match-full-lines --strict-whitespace --check-prefix=DYNSYM
8 # DYNSYM:{{.*}}file format elf64-x86-64
10 # DYNSYM-NEXT:DYNAMIC SYMBOL TABLE:
11 # DYNSYM-NEXT:0000000000000000 l DO .data 0000000000000000 localsym
12 # DYNSYM-NEXT:0000000000000000 g DO .data 0000000000000000 globalsym
13 # DYNSYM-NEXT:0000000000000000 u DO .data 0000000000000000 uniqueglobalsym
14 # DYNSYM-NEXT:0000000000000000 w DO .data 0000000000000000 weaksym
15 # DYNSYM-NEXT:0000000000000000 g Df .data 0000000000000000 filesym
16 # DYNSYM-NEXT:0000000000000000 g DF .data 0000000000000000 funcsym
28 Flags: [ SHF_ALLOC, SHF_WRITE ]
38 - Name: uniqueglobalsym
41 Binding: STB_GNU_UNIQUE
55 ## Test dumping ELF files with no .dynsym section.
56 # RUN: yaml2obj --docnum=2 %s -o %t2
57 # RUN: llvm-objdump --dynamic-syms %t2 | \
58 # RUN: FileCheck %s --match-full-lines --strict-whitespace --check-prefix=NODYNSYM
59 # RUN: llvm-objdump -T %t2 | \
60 # RUN: FileCheck %s --match-full-lines --strict-whitespace --check-prefix=NODYNSYM
62 # NODYNSYM:DYNAMIC SYMBOL TABLE:
72 ## Test dumping ELF files with logically empty .dynsym section (only has a 0-index NULL symbol).
73 # RUN: yaml2obj --docnum=3 %s -o %t3
74 # RUN: llvm-objdump --dynamic-syms %t3 | \
75 # RUN: FileCheck %s --match-full-lines --strict-whitespace --check-prefix=ONLY-NULL
76 # RUN: llvm-objdump -T %t3 | \
77 # RUN: FileCheck %s --match-full-lines --strict-whitespace --check-prefix=ONLY-NULL
79 # ONLY-NULL:DYNAMIC SYMBOL TABLE:
90 ## Test dumping ELF files with truly empty .dynsym section (size of .dynsym section is 0).
91 # RUN: yaml2obj --docnum=4 %s -o %t4
92 # RUN: llvm-objdump --dynamic-syms %t4 | \
93 # RUN: FileCheck %s --match-full-lines --strict-whitespace --check-prefix=EMPTY
94 # RUN: llvm-objdump -T %t4 | \
95 # RUN: FileCheck %s --match-full-lines --strict-whitespace --check-prefix=EMPTY
97 # EMPTY:DYNAMIC SYMBOL TABLE: