1# RUN: yaml2obj %s -o %t
2# RUN: not llvm-ifs --input-format=ELF --output-format=IFS --output=%t.tbe %t 2>&1 | FileCheck %s
3
4!ELF
5FileHeader:
6  Class:           ELFCLASS64
7  Data:            ELFDATA2LSB
8  Type:            ET_DYN
9  Machine:         EM_X86_64
10Sections:
11  - Name:            .dynstr
12    Type:            SHT_STRTAB
13    Flags:           [ SHF_ALLOC ]
14    Address:         0x1000
15    #                "\0libfoo.so\0libbar.so\0somelib.so\0foo\0"
16    Content:         "006c6962666f6f2e736f006c69626261722e736f00736f6d656c69622e736f00666f6f00"
17  - Name:            .dynamic
18    Type:            SHT_DYNAMIC
19    Flags:           [ SHF_ALLOC ]
20    Address:         0x0000000000001024
21    EntSize:         0x0000000000000010
22    Entries:
23      - Tag:             DT_NEEDED
24        Value:           0x0000000000000001
25      - Tag:             DT_SONAME
26        Value:           0x0000000000000015
27      # Bad DT_NEEDED entry (offset outside string table):
28      - Tag:             DT_NEEDED
29        Value:           0x000000000000FFFF
30      - Tag:             DT_STRSZ
31        Value:           0x0000000000000024
32      - Tag:             DT_STRTAB
33        Value:           0x0000000000001000
34      - Tag:             DT_SYMTAB
35        Value:           0x0000000000001000
36      - Tag:             DT_NULL
37        Value:           0x0000000000000000
38ProgramHeaders:
39  - Type:     PT_LOAD
40    Flags:    [ PF_R ]
41    VAddr:    0x1000
42    Align:    8
43    FirstSec: .dynstr
44    LastSec:  .dynamic
45  - Type:  PT_DYNAMIC
46    Flags: [ PF_X, PF_R ]
47    VAddr: 0x1024
48
49# CHECK: DT_NEEDED string offset (0x000000000000ffff) outside of dynamic string table
50