many-sections.test
3.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
RUN: %python %p/../Inputs/ungzip.py %p/Inputs/many-sections.o.gz > %t
RUN: llvm-objcopy %t %t2
RUN: llvm-readobj --file-headers %t2 | FileCheck --check-prefix=EHDR %s
RUN: llvm-readobj --sections %t2 | FileCheck --check-prefix=SECS %s
RUN: llvm-readobj --symbols %t2 | grep "Symbol {" | wc -l | FileCheck --check-prefix=SYMS %s
RUN: llvm-readobj --symbols %t2 | FileCheck %s --check-prefix=SYM_SEC_IDS
EHDR: Format: ELF64-x86-64
EHDR-NEXT: Arch: x86_64
EHDR-NEXT: AddressSize: 64bit
EHDR-NEXT: LoadName:
EHDR-NEXT: ElfHeader {
EHDR-NEXT: Ident {
EHDR-NEXT: Magic: (7F 45 4C 46)
EHDR-NEXT: Class: 64-bit (0x2)
EHDR-NEXT: DataEncoding: LittleEndian (0x1)
EHDR-NEXT: FileVersion: 1
EHDR-NEXT: OS/ABI: SystemV (0x0)
EHDR-NEXT: ABIVersion: 0
EHDR-NEXT: Unused: (00 00 00 00 00 00 00)
EHDR-NEXT: }
EHDR-NEXT: Type: Relocatable (0x1)
EHDR-NEXT: Machine: EM_X86_64 (0x3E)
EHDR-NEXT: Version: 1
EHDR-NEXT: Entry: 0x0
EHDR-NEXT: ProgramHeaderOffset: 0x0
EHDR-NEXT: SectionHeaderOffset:
EHDR-NEXT: Flags [ (0x0)
EHDR-NEXT: ]
EHDR-NEXT: HeaderSize: 64
EHDR-NEXT: ProgramHeaderEntrySize: 0
EHDR-NEXT: ProgramHeaderCount: 0
EHDR-NEXT: SectionHeaderEntrySize: 64
EHDR-NEXT: SectionHeaderCount: 0
EHDR-NEXT: StringTableSectionIndex: 65535
EHDR-NEXT: }
SECS: Index: 65285
SECS-NEXT: Name: .symtab
SECS-NEXT: Type: SHT_SYMTAB
SECS: Name: .symtab_shndx
SECS-NEXT: Type: SHT_SYMTAB_SHNDX
SECS-NEXT: Flags [ (0x0)
SECS-NEXT: ]
SECS-NEXT: Address: 0x0
SECS-NEXT: Offset:
# There should be #syms * EntrySize bytes.
SECS-NEXT: Size: 261136
SECS-NEXT: Link: 65285
SECS-NEXT: Info:
SECS-NEXT: AddressAlignment: 4
SECS-NEXT: EntrySize: 4
SECS: Index: 65287
SYMS: 65284
SYM_SEC_IDS: Section: s9 (0xFEFF)
SYM_SEC_IDS-NEXT: }
SYM_SEC_IDS-NEXT: Symbol {
SYM_SEC_IDS-NEXT: Name: s9 (37)
SYM_SEC_IDS-NEXT: Value: 0x0
SYM_SEC_IDS-NEXT: Size: 0
SYM_SEC_IDS-NEXT: Binding: Local (0x0)
SYM_SEC_IDS-NEXT: Type: None (0x0)
SYM_SEC_IDS-NEXT: Other: 0
SYM_SEC_IDS-NEXT: Section: s9 (0xFF01)
SYM_SEC_IDS-NEXT: }
SYM_SEC_IDS-NEXT: Symbol {
SYM_SEC_IDS-NEXT: Name: s9 (37)
SYM_SEC_IDS-NEXT: Value: 0x0
SYM_SEC_IDS-NEXT: Size: 0
SYM_SEC_IDS-NEXT: Binding: Local (0x0)
SYM_SEC_IDS-NEXT: Type: None (0x0)
SYM_SEC_IDS-NEXT: Other: 0
SYM_SEC_IDS-NEXT: Section: s9 (0xFF00)
SYM_SEC_IDS-NEXT: }
SYM_SEC_IDS-NEXT: Symbol {
SYM_SEC_IDS-NEXT: Name: s9 (37)
SYM_SEC_IDS-NEXT: Value: 0x0
SYM_SEC_IDS-NEXT: Size: 0
SYM_SEC_IDS-NEXT: Binding: Local (0x0)
SYM_SEC_IDS-NEXT: Type: None (0x0)
SYM_SEC_IDS-NEXT: Other: 0
SYM_SEC_IDS-NEXT: Section: s9 (0x1982)
SYM_SEC_IDS-NEXT: }
SYM_SEC_IDS-NEXT: Symbol {
SYM_SEC_IDS-NEXT: Name: s9 (37)
SYM_SEC_IDS-NEXT: Value: 0x0
SYM_SEC_IDS-NEXT: Size: 0
SYM_SEC_IDS-NEXT: Binding: Local (0x0)
SYM_SEC_IDS-NEXT: Type: None (0x0)
SYM_SEC_IDS-NEXT: Other: 0
SYM_SEC_IDS-NEXT: Section: s9 (0xFF03)
SYM_SEC_IDS-NEXT: }
SYM_SEC_IDS-NEXT: Symbol {
SYM_SEC_IDS-NEXT: Name: s9 (37)
SYM_SEC_IDS-NEXT: Value: 0x0
SYM_SEC_IDS-NEXT: Size: 0
SYM_SEC_IDS-NEXT: Binding: Local (0x0)
SYM_SEC_IDS-NEXT: Type: None (0x0)
SYM_SEC_IDS-NEXT: Other: 0
SYM_SEC_IDS-NEXT: Section: s9 (0xFF04)
SYM_SEC_IDS-NEXT: }