1# RUN: yaml2obj %s -o %t
2# RUN: llvm-readobj %t --dynamic-table | FileCheck %s
3
4## Check we write a valid .dynamic section values when emiting a 32-bit object.
5
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: ]
11
12!ELF
13FileHeader:
14  Class: ELFCLASS32
15  Data:  ELFDATA2LSB
16  Type:  ET_DYN
17Sections:
18  - Name:            .dynamic
19    Type:            SHT_DYNAMIC
20    Flags:           [ SHF_ALLOC ]
21    Address:         0x0000000000000008
22    AddressAlign:    0x0000000000000008
23    EntSize:         0x0000000000000010
24    Entries:
25      - Tag:             DT_STRSZ
26        Value:           0x0000000000000001
27      - Tag:             DT_NULL
28        Value:           0x0000000000000000
29ProgramHeaders:
30  - Type:     PT_LOAD
31    Flags:    [ PF_R ]
32    VAddr:    0x0000
33    Align:    8
34    FirstSec: .dynamic
35    LastSec:  .dynamic
36  - Type:     PT_DYNAMIC
37    Flags:    [ PF_X, PF_R ]
38    VAddr:    0x0008
39    FirstSec: .dynamic
40    LastSec:  .dynamic
41