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