Recommit "rL366894: [yaml2obj] - Allow custom fields for the SHT_UNDEF sections."
[llvm-complete.git] / test / tools / llvm-objdump / elf-dynamic-section.test
blobb21541709410fba7bcb41ca7e439ac8148b7fc1e
1 # RUN: yaml2obj %s > %t
2 # RUN: llvm-objdump -p %t | FileCheck %s
4 # CHECK:      Dynamic Section:
5 # CHECK-NEXT:   NEEDED               D
6 # CHECK-NEXT:   PLTRELSZ             0x0000000000000010
7 # CHECK-NEXT:   PLTGOT               0x0000000000001000
8 # CHECK-NEXT:   HASH                 0x0000000000001000
9 # CHECK-NEXT:   STRTAB               0x0000000000001000
10 # CHECK-NEXT:   SYMTAB               0x0000000000001000
11 # CHECK-NEXT:   RELA                 0x0000000000001000
12 # CHECK-NEXT:   RELASZ               0x0000000000000010
13 # CHECK-NEXT:   RELAENT              0x0000000000000789
14 # CHECK-NEXT:   STRSZ                0x0000000000000010
15 # CHECK-NEXT:   SYMENT               0x0000000000000987
16 # CHECK-NEXT:   INIT                 0x0000000000001000
17 # CHECK-NEXT:   FINI                 0x0000000000001000
18 # CHECK-NEXT:   SONAME               U
19 # CHECK-NEXT:   RPATH                f
20 # CHECK-NEXT:   SYMBOLIC             0x1234567890abcdef
21 # CHECK-NEXT:   REL                  0x0000000000001000
22 # CHECK-NEXT:   RELSZ                0x0000000000000010
23 # CHECK-NEXT:   RELENT               0x0000000000000123
24 # CHECK-NEXT:   PLTREL               0x0000000000000007
25 # CHECK-NEXT:   DEBUG                0xfedcba0987654321
26 # CHECK-NEXT:   TEXTREL              0x1122334455667788
27 # CHECK-NEXT:   JMPREL               0x0000000000001000
28 # CHECK-NEXT:   BIND_NOW             0x8877665544332211
29 # CHECK-NEXT:   INIT_ARRAY           0x0000000000001000
30 # CHECK-NEXT:   FINI_ARRAY           0x0000000000001000
31 # CHECK-NEXT:   INIT_ARRAYSZ         0x0000000000000010
32 # CHECK-NEXT:   FINI_ARRAYSZ         0x0000000000000010
33 # CHECK-NEXT:   RUNPATH              w
34 # CHECK-NEXT:   FLAGS                0xaabbccddeeff9900
35 # CHECK-NEXT:   PREINIT_ARRAY        0x0000000000001000
36 # CHECK-NEXT:   PREINIT_ARRAYSZ      0x0000000000000010
37 # CHECK-NEXT:   SYMTAB_SHNDX         0x0000000000001000
38 # CHECK-NEXT:   RELRSZ               0x0000000000000010
39 # CHECK-NEXT:   RELR                 0x0000000000001000
40 # CHECK-NEXT:   RELRENT              0x0000000000004321
41 # CHECK-NEXT:   ANDROID_REL          0x0000000000001000
42 # CHECK-NEXT:   ANDROID_RELSZ        0x0000000000000010
43 # CHECK-NEXT:   ANDROID_RELA         0x0000000000001000
44 # CHECK-NEXT:   ANDROID_RELASZ       0x0000000000000010
45 # CHECK-NEXT:   ANDROID_RELR         0x0000000000001000
46 # CHECK-NEXT:   ANDROID_RELRSZ       0x0000000000000010
47 # CHECK-NEXT:   ANDROID_RELRENT      0x0000000000001234
48 # CHECK-NEXT:   GNU_HASH             0x0000000000001000
49 # CHECK-NEXT:   TLSDESC_PLT          0x0000000000001000
50 # CHECK-NEXT:   TLSDESC_GOT          0x0000000000001000
51 # CHECK-NEXT:   RELACOUNT            0x0000000000000000
52 # CHECK-NEXT:   RELCOUNT             0x0000000000000000
53 # CHECK-NEXT:   FLAGS_1              0x0000000087654321
54 # CHECK-NEXT:   VERSYM               0x0000000000001000
55 # CHECK-NEXT:   VERDEF               0x0000000000001000
56 # CHECK-NEXT:   VERDEFNUM            0x0000000000000000
57 # CHECK-NEXT:   VERNEED              0x0000000000001000
58 # CHECK-NEXT:   VERNEEDNUM           0x0000000000000000
59 # CHECK-NEXT:   AUXILIARY            D
60 # CHECK-NEXT:   FILTER               U
61 # CHECK-NEXT:   <unknown:>0x1234abcd 0x0000000000000001
63 --- !ELF
64 FileHeader:
65   Class:   ELFCLASS64
66   Data:    ELFDATA2LSB
67   Type:    ET_EXEC
68   Machine: EM_X86_64
69 Sections:
70   - Name:    .dynstr
71     Type:    SHT_STRTAB
72     Address: 0x1000
73     Size:    0x10
74     Content: "004400550066007700"
75   - Name:    .dynamic
76     Type:    SHT_DYNAMIC
77     Address: 0x1010
78     Link:    1
79     Entries:
80      - Tag:   DT_NEEDED
81        Value: 0x1
82      - Tag:   DT_PLTRELSZ
83        Value: 0x10
84      - Tag:   DT_PLTGOT
85        Value: 0x1000
86      - Tag:   DT_HASH
87        Value: 0x1000
88      - Tag:   DT_STRTAB
89        Value: 0x1000
90      - Tag:   DT_SYMTAB
91        Value: 0x1000
92      - Tag:   DT_RELA
93        Value: 0x1000
94      - Tag:   DT_RELASZ
95        Value: 0x10
96      - Tag:   DT_RELAENT
97        Value: 0x789
98      - Tag:   DT_STRSZ
99        Value: 0x10
100      - Tag:   DT_SYMENT
101        Value: 0x987
102      - Tag:   DT_INIT
103        Value: 0x1000
104      - Tag:   DT_FINI
105        Value: 0x1000
106      - Tag:   DT_SONAME
107        Value: 0x3
108      - Tag:   DT_RPATH
109        Value: 0x5
110      - Tag:   DT_SYMBOLIC
111        Value: 0x1234567890abcdef
112      - Tag:   DT_REL
113        Value: 0x1000
114      - Tag:   DT_RELSZ
115        Value: 0x10
116      - Tag:   DT_RELENT
117        Value: 0x123
118      - Tag:   DT_PLTREL
119        Value: 0x7
120      - Tag:   DT_DEBUG
121        Value: 0xfedcba0987654321
122      - Tag:   DT_TEXTREL
123        Value: 0x1122334455667788
124      - Tag:   DT_JMPREL
125        Value: 0x1000
126      - Tag:   DT_BIND_NOW
127        Value: 0x8877665544332211
128      - Tag:   DT_INIT_ARRAY
129        Value: 0x1000
130      - Tag:   DT_FINI_ARRAY
131        Value: 0x1000
132      - Tag:   DT_INIT_ARRAYSZ
133        Value: 0x10
134      - Tag:   DT_FINI_ARRAYSZ
135        Value: 0x10
136      - Tag:   DT_RUNPATH
137        Value: 0x7
138      - Tag:   DT_FLAGS
139        Value: 0xaabbccddeeff9900
140      - Tag:   DT_PREINIT_ARRAY
141        Value: 0x1000
142      - Tag:   DT_PREINIT_ARRAYSZ
143        Value: 0x10
144      - Tag:   DT_SYMTAB_SHNDX
145        Value: 0x1000
146      - Tag:   DT_RELRSZ
147        Value: 0x10
148      - Tag:   DT_RELR
149        Value: 0x1000
150      - Tag:   DT_RELRENT
151        Value: 0x4321
152      - Tag:   DT_ANDROID_REL
153        Value: 0x1000
154      - Tag:   DT_ANDROID_RELSZ
155        Value: 0x10
156      - Tag:   DT_ANDROID_RELA
157        Value: 0x1000
158      - Tag:   DT_ANDROID_RELASZ
159        Value: 0x10
160      - Tag:   DT_ANDROID_RELR
161        Value: 0x1000
162      - Tag:   DT_ANDROID_RELRSZ
163        Value: 0x10
164      - Tag:   DT_ANDROID_RELRENT
165        Value: 0x1234
166      - Tag:   DT_GNU_HASH
167        Value: 0x1000
168      - Tag:   DT_TLSDESC_PLT
169        Value: 0x1000
170      - Tag:   DT_TLSDESC_GOT
171        Value: 0x1000
172      - Tag:   DT_RELACOUNT
173        Value: 0x0
174      - Tag:   DT_RELCOUNT
175        Value: 0x0
176      - Tag:   DT_FLAGS_1
177        Value: 0x87654321
178      - Tag:   DT_VERSYM
179        Value: 0x1000
180      - Tag:   DT_VERDEF
181        Value: 0x1000
182      - Tag:   DT_VERDEFNUM
183        Value: 0x0
184      - Tag:   DT_VERNEED
185        Value: 0x1000
186      - Tag:   DT_VERNEEDNUM
187        Value: 0x0
188      - Tag:   DT_AUXILIARY
189        Value: 0x1
190      - Tag:   DT_FILTER
191        Value: 0x3
192      - Tag:   0x1234abcd
193        Value: 0x1
194      - Tag:   DT_NULL
195        Value: 0x0
196 ProgramHeaders:
197   - Type: PT_LOAD
198     VAddr: 0x1000
199     Sections:
200       - Section: .dynstr
201       - Section: .dynamic
202   - Type: PT_DYNAMIC
203     VAddr: 0x1010
204     Sections:
205       - Section: .dynamic