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: gnu_attributes
55 # LLVM: Type: SHT_GNU_ATTRIBUTES
56 # LLVM: Name: gnu_hash
57 # LLVM: Type: SHT_GNU_HASH
58 # LLVM: Name: gnu_verdef
59 # LLVM: Type: SHT_GNU_verdef
60 # LLVM: Name: gnu_verneed
61 # LLVM: Type: SHT_GNU_verneed
63 # LLVM: Type: Unknown (0x1000)
65 # LLVM: Type: Unknown (0x60000000)
67 # LLVM: Type: Unknown (0x60000F00)
69 # LLVM: Type: SHT_GNU_versym
71 # LLVM: Type: Unknown (0x70000000)
73 # LLVM: Type: Unknown (0x70000F00)
75 # LLVM: Type: Unknown (0x7FFFFFFF)
77 # LLVM: Type: Unknown (0x80000000)
79 # LLVM: Type: Unknown (0x80000F00)
81 # LLVM: Type: Unknown (0xFFFFFFFF)
83 # LLVM: Type: SHT_SYMTAB
85 # LLVM: Type: SHT_STRTAB
88 # GNU-NEXT: progbits PROGBITS
91 # GNU-NEXT: dynamic DYNAMIC
93 # GNU-NEXT: nobits NOBITS
95 # GNU-NEXT: shlib SHLIB
96 # GNU-NEXT: dynsym DYNSYM
97 # GNU-NEXT: init_array INIT_ARRAY
98 # GNU-NEXT: fini_array FINI_ARRAY
99 # GNU-NEXT: preinit_array PREINIT_ARRAY
100 # GNU-NEXT: group GROUP
101 # GNU-NEXT: symtab_shndx SYMTAB SECTION INDICES
102 # GNU-NEXT: relr RELR
103 # GNU-NEXT: android_rel ANDROID_REL
104 # GNU-NEXT: android_rela ANDROID_RELA
105 # GNU-NEXT: android_relr RELR
106 # GNU-NEXT: llvm_odrtab LLVM_ODRTAB
107 # GNU-NEXT: linker_options LLVM_LINKER_OPTIONS
108 # GNU-NEXT: llvm_call_graph_profile LLVM_CALL_GRAPH_PROFILE
109 # GNU-NEXT: llvm_addrsig LLVM_ADDRSIG
110 # GNU-NEXT: gnu_attributes ATTRIBUTES
111 # GNU-NEXT: gnu_hash GNU_HASH
112 # GNU-NEXT: gnu_verdef VERDEF
113 # GNU-NEXT: gnu_verneed VERNEED
114 # GNU-NEXT: unknown 0x1000: <unknown>
115 # GNU-NEXT: loos LOOS+0x0
116 # GNU-NEXT: fooos LOOS+0xF00
117 # GNU-NEXT: hios VERSYM
118 # GNU-NEXT: loproc LOPROC+0x0
119 # GNU-NEXT: fooproc LOPROC+0xF00
120 # GNU-NEXT: hiproc LOPROC+0xFFFFFFF
121 # GNU-NEXT: louser LOUSER+0x0
122 # GNU-NEXT: foouser LOUSER+0xF00
123 # GNU-NEXT: hiuser LOUSER+0x7FFFFFFF
124 # GNU-NEXT: .symtab SYMTAB
125 # GNU-NEXT: .strtab STRTAB
159 - Name: preinit_array
160 Type: SHT_PREINIT_ARRAY
167 Type: SHT_SYMTAB_SHNDX
170 Content: "0000000000000000"
174 Type: SHT_ANDROID_REL
176 Type: SHT_ANDROID_RELA
178 Type: SHT_ANDROID_RELR
180 Type: SHT_LLVM_ODRTAB
181 - Name: linker_options
182 Type: SHT_LLVM_LINKER_OPTIONS
183 - Name: llvm_call_graph_profile
184 Type: SHT_LLVM_CALL_GRAPH_PROFILE
186 Type: SHT_LLVM_ADDRSIG
187 - Name: gnu_attributes
188 Type: SHT_GNU_ATTRIBUTES
196 Type: SHT_GNU_verneed