1RUN: %python %p/Inputs/ungzip.py %p/Inputs/many-sections.o.gz > %t 2RUN: llvm-objcopy %t %t2 3RUN: llvm-readobj -file-headers %t2 | FileCheck --check-prefix=EHDR %s 4RUN: llvm-readobj -sections %t2 | FileCheck --check-prefix=SECS %s 5RUN: llvm-readobj -symbols %t2 | grep "Symbol {" | wc -l | FileCheck --check-prefix=SYMS %s 6 7EHDR: Format: ELF64-x86-64 8EHDR-NEXT: Arch: x86_64 9EHDR-NEXT: AddressSize: 64bit 10EHDR-NEXT: LoadName: 11EHDR-NEXT: ElfHeader { 12EHDR-NEXT: Ident { 13EHDR-NEXT: Magic: (7F 45 4C 46) 14EHDR-NEXT: Class: 64-bit (0x2) 15EHDR-NEXT: DataEncoding: LittleEndian (0x1) 16EHDR-NEXT: FileVersion: 1 17EHDR-NEXT: OS/ABI: SystemV (0x0) 18EHDR-NEXT: ABIVersion: 0 19EHDR-NEXT: Unused: (00 00 00 00 00 00 00) 20EHDR-NEXT: } 21EHDR-NEXT: Type: Relocatable (0x1) 22EHDR-NEXT: Machine: EM_X86_64 (0x3E) 23EHDR-NEXT: Version: 1 24EHDR-NEXT: Entry: 0x0 25EHDR-NEXT: ProgramHeaderOffset: 0x40 26EHDR-NEXT: SectionHeaderOffset: 27EHDR-NEXT: Flags [ (0x0) 28EHDR-NEXT: ] 29EHDR-NEXT: HeaderSize: 64 30EHDR-NEXT: ProgramHeaderEntrySize: 56 31EHDR-NEXT: ProgramHeaderCount: 0 32EHDR-NEXT: SectionHeaderEntrySize: 64 33EHDR-NEXT: SectionHeaderCount: 0 34EHDR-NEXT: StringTableSectionIndex: 65535 35EHDR-NEXT: } 36 37SECS: Index: 65285 38SECS-NEXT: Name: .symtab 39SECS-NEXT: Type: SHT_SYMTAB 40SECS: Name: .symtab_shndx 41SECS-NEXT: Type: SHT_SYMTAB_SHNDX 42SECS-NEXT: Flags [ (0x0) 43SECS-NEXT: ] 44SECS-NEXT: Address: 0x0 45SECS-NEXT: Offset: 46# There should be #syms * EntrySize bytes. 47SECS-NEXT: Size: 261136 48SECS-NEXT: Link: 65285 49SECS-NEXT: Info: 50SECS-NEXT: AddressAlignment: 4 51SECS-NEXT: EntrySize: 4 52SECS: Index: 65287 53SYMS: 65284 54