1 # Show that all regular section types are properly printed for both LLVM and
4 # RUN: yaml2obj %s -o %t-basic.o
5 # RUN: llvm-readobj --section-headers %t-basic.o | FileCheck %s --check-prefix=LLVM
6 # RUN: llvm-readelf --section-headers %t-basic.o | FileCheck %s --check-prefix=GNU
10 # LLVM: Name: progbits
11 # LLVM: Type: SHT_PROGBITS
13 # LLVM: Type: SHT_RELA
15 # LLVM: Type: SHT_HASH
17 # LLVM: Type: SHT_DYNAMIC
19 # LLVM: Type: SHT_NOTE
21 # LLVM: Type: SHT_NOBITS
25 # LLVM: Type: SHT_SHLIB
27 # LLVM: Type: SHT_DYNSYM
28 # LLVM: Name: init_array
29 # LLVM: Type: SHT_INIT_ARRAY
30 # LLVM: Name: fini_array
31 # LLVM: Type: SHT_FINI_ARRAY
32 # LLVM: Name: preinit_array
33 # LLVM: Type: SHT_PREINIT_ARRAY
35 # LLVM: Type: SHT_GROUP
36 # LLVM: Name: symtab_shndx
37 # LLVM: Type: SHT_SYMTAB_SHNDX
39 # LLVM: Type: SHT_RELR
40 # LLVM: Name: android_rel
41 # LLVM: Type: SHT_ANDROID_REL
42 # LLVM: Name: android_rela
43 # LLVM: Type: SHT_ANDROID_RELA
44 # LLVM: Name: android_relr
45 # LLVM: Type: SHT_ANDROID_RELR
46 # LLVM: Name: llvm_odrtab
47 # LLVM: Type: SHT_LLVM_ODRTAB
48 # LLVM: Name: linker_options
49 # LLVM: Type: SHT_LLVM_LINKER_OPTIONS
50 # LLVM: Name: llvm_call_graph_profile
51 # LLVM: Type: SHT_LLVM_CALL_GRAPH_PROFILE
52 # LLVM: Name: llvm_addrsig
53 # LLVM: Type: SHT_LLVM_ADDRSIG
54 # LLVM: Name: .deplibs
55 # LLVM: Type: SHT_LLVM_DEPENDENT_LIBRARIES
56 # LLVM: Name: .llvm_sympart.f
57 # LLVM: Type: SHT_LLVM_SYMPART
59 # LLVM: Type: SHT_LLVM_PART_EHDR
61 # LLVM: Type: SHT_LLVM_PART_PHDR
62 # LLVM: Name: gnu_attributes
63 # LLVM: Type: SHT_GNU_ATTRIBUTES
64 # LLVM: Name: gnu_hash
65 # LLVM: Type: SHT_GNU_HASH
66 # LLVM: Name: gnu_verdef
67 # LLVM: Type: SHT_GNU_verdef
68 # LLVM: Name: gnu_verneed
69 # LLVM: Type: SHT_GNU_verneed
71 # LLVM: Type: Unknown (0x1000)
73 # LLVM: Type: Unknown (0x60000000)
75 # LLVM: Type: Unknown (0x60000F00)
77 # LLVM: Type: SHT_GNU_versym
79 # LLVM: Type: Unknown (0x70000000)
81 # LLVM: Type: Unknown (0x70000F00)
83 # LLVM: Type: Unknown (0x7FFFFFFF)
85 # LLVM: Type: Unknown (0x80000000)
87 # LLVM: Type: Unknown (0x80000F00)
89 # LLVM: Type: Unknown (0xFFFFFFFF)
91 # LLVM: Type: SHT_SYMTAB
93 # LLVM: Type: SHT_STRTAB
96 # GNU-NEXT: progbits PROGBITS
99 # GNU-NEXT: dynamic DYNAMIC
100 # GNU-NEXT: note NOTE
101 # GNU-NEXT: nobits NOBITS
103 # GNU-NEXT: shlib SHLIB
104 # GNU-NEXT: dynsym DYNSYM
105 # GNU-NEXT: init_array INIT_ARRAY
106 # GNU-NEXT: fini_array FINI_ARRAY
107 # GNU-NEXT: preinit_array PREINIT_ARRAY
108 # GNU-NEXT: group GROUP
109 # GNU-NEXT: symtab_shndx SYMTAB SECTION INDICES
110 # GNU-NEXT: relr RELR
111 # GNU-NEXT: android_rel ANDROID_REL
112 # GNU-NEXT: android_rela ANDROID_RELA
113 # GNU-NEXT: android_relr RELR
114 # GNU-NEXT: llvm_odrtab LLVM_ODRTAB
115 # GNU-NEXT: linker_options LLVM_LINKER_OPTIONS
116 # GNU-NEXT: llvm_call_graph_profile LLVM_CALL_GRAPH_PROFILE
117 # GNU-NEXT: llvm_addrsig LLVM_ADDRSIG
118 # GNU-NEXT: .deplibs LLVM_DEPENDENT_LIBRARIES
119 # GNU-NEXT: .llvm_sympart.f LLVM_SYMPART
120 # GNU-NEXT: part1 LLVM_PART_EHDR
121 # GNU-NEXT: .phdrs LLVM_PART_PHDR
122 # GNU-NEXT: gnu_attributes ATTRIBUTES
123 # GNU-NEXT: gnu_hash GNU_HASH
124 # GNU-NEXT: gnu_verdef VERDEF
125 # GNU-NEXT: gnu_verneed VERNEED
126 # GNU-NEXT: unknown 0x1000: <unknown>
127 # GNU-NEXT: loos LOOS+0x0
128 # GNU-NEXT: fooos LOOS+0xF00
129 # GNU-NEXT: hios VERSYM
130 # GNU-NEXT: loproc LOPROC+0x0
131 # GNU-NEXT: fooproc LOPROC+0xF00
132 # GNU-NEXT: hiproc LOPROC+0xFFFFFFF
133 # GNU-NEXT: louser LOUSER+0x0
134 # GNU-NEXT: foouser LOUSER+0xF00
135 # GNU-NEXT: hiuser LOUSER+0x7FFFFFFF
136 # GNU-NEXT: .symtab SYMTAB
137 # GNU-NEXT: .strtab STRTAB
171 - Name: preinit_array
172 Type: SHT_PREINIT_ARRAY
179 Type: SHT_SYMTAB_SHNDX
185 Type: SHT_ANDROID_REL
187 Type: SHT_ANDROID_RELA
189 Type: SHT_ANDROID_RELR
191 Type: SHT_LLVM_ODRTAB
192 - Name: linker_options
193 Type: SHT_LLVM_LINKER_OPTIONS
194 - Name: llvm_call_graph_profile
195 Type: SHT_LLVM_CALL_GRAPH_PROFILE
197 Type: SHT_LLVM_ADDRSIG
199 Type: SHT_LLVM_DEPENDENT_LIBRARIES
200 - Name: .llvm_sympart.f
201 Type: SHT_LLVM_SYMPART
203 Type: SHT_LLVM_PART_EHDR
205 Type: SHT_LLVM_PART_PHDR
206 - Name: gnu_attributes
207 Type: SHT_GNU_ATTRIBUTES
215 Type: SHT_GNU_verneed