1 ## Check that obj2yaml doesn't create a "Symbols" tag for the objects
2 ## without a symbol table.
4 # RUN: yaml2obj --docnum=1 %s -o %t1
5 # RUN: obj2yaml %t1 | FileCheck %s --check-prefix=NOSYMTAB
8 # NOSYMTAB-NEXT: FileHeader:
9 # NOSYMTAB-NEXT: Class: ELFCLASS64
10 # NOSYMTAB-NEXT: Data: ELFDATA2LSB
11 # NOSYMTAB-NEXT: Type: ET_DYN
20 ## Check that obj2yaml creates a "Symbols" tag for the objects
21 ## that have a symbol table.
23 # RUN: yaml2obj --docnum=2 %s -o %t2
24 # RUN: obj2yaml %t2 | FileCheck %s --check-prefix=SYMTAB
27 # SYMTAB-NEXT: FileHeader:
28 # SYMTAB-NEXT: Class: ELFCLASS64
29 # SYMTAB-NEXT: Data: ELFDATA2LSB
30 # SYMTAB-NEXT: Type: ET_DYN
31 # SYMTAB-NEXT: Symbols: []
41 ## A symbol table without the null entry is non-conforming.
42 ## Check we don't print "Symbols" and "DynamicSymbols" keys in this case.
44 # RUN: yaml2obj --docnum=3 %s -o %t3
45 # RUN: obj2yaml %t3 | FileCheck %s --check-prefix=EMPTY
48 # EMPTY-NEXT: - Name: .symtab
49 # EMPTY-NEXT: Type: SHT_SYMTAB
50 # EMPTY-NEXT: Link: .strtab
51 # EMPTY-NEXT: Size: 0x0
52 # EMPTY-NEXT: - Name: .dynsym
53 # EMPTY-NEXT: Type: SHT_DYNSYM
54 # EMPTY-NEXT: Flags: [ SHF_ALLOC ]
55 # EMPTY-NEXT: Size: 0x0