Recommit "rL366894: [yaml2obj] - Allow custom fields for the SHT_UNDEF sections."
[llvm-complete.git] / test / tools / yaml2obj / dynamic-section-i386.test
blob89f7de6fd7651ee93d3c2a1a43bf3f1f513c1aab
1 # RUN: yaml2obj %s -o %t
2 # RUN: llvm-readobj %t --dynamic-table | FileCheck %s
4 ## Check we write a valid .dynamic section values when emiting a 32-bit object.
6 # CHECK:      DynamicSection [ (2 entries)
7 # CHECK-NEXT:   Tag        Type                 Name/Value
8 # CHECK-NEXT:   0x0000000A STRSZ                1 (bytes)
9 # CHECK-NEXT:   0x00000000 NULL                 0x0
10 # CHECK-NEXT: ]
12 !ELF
13 FileHeader:
14   Class:           ELFCLASS32
15   Data:            ELFDATA2LSB
16   Type:            ET_DYN
17   Machine:         EM_386
18 Sections:
19   - Name:            .dynamic
20     Type:            SHT_DYNAMIC
21     Flags:           [ SHF_ALLOC ]
22     Address:         0x0000000000000008
23     AddressAlign:    0x0000000000000008
24     EntSize:         0x0000000000000010
25     Entries:
26       - Tag:             DT_STRSZ
27         Value:           0x0000000000000001
28       - Tag:             DT_NULL
29         Value:           0x0000000000000000
30 ProgramHeaders:
31   - Type: PT_LOAD
32     Flags: [ PF_R ]
33     VAddr: 0x0000
34     PAddr: 0x0000
35     Align: 8
36     Sections:
37       - Section: .dynamic
38   - Type: PT_DYNAMIC
39     Flags: [ PF_X, PF_R ]
40     VAddr: 0x0008
41     PAddr: 0x0008
42     Sections:
43       - Section: .dynamic