1# Test handling of (corrupt?) object files, which have sections with overlapping
2# virtual addresses.
3#
4# Right now the overlapping sections get dropped, but other behaviors
5# (including outright rejecting such files) are possible too.
6
7# RUN: yaml2obj %s -o %t
8# RUN: lldb-test object-file %t | FileCheck %s
9
10# CHECK-NOT: .overlap1
11# CHECK-NOT: .overlap2
12
13!ELF
14FileHeader:
15  Class:           ELFCLASS32
16  Data:            ELFDATA2LSB
17  Type:            ET_EXEC
18  Machine:         EM_ARM
19Sections:
20  - Name:            .sect1
21    Type:            SHT_PROGBITS
22    Flags:           [ SHF_ALLOC ]
23    Address:         0x1000
24    AddressAlign:    0x4
25    Content:         DEADBEEFBAADF00D
26  - Name:            .overlap1
27    Type:            SHT_PROGBITS
28    Flags:           [ SHF_ALLOC ]
29    Address:         0x1004
30    AddressAlign:    0x4
31    Content:         DEADBEEFBAADF00D
32  - Name:            .sect2
33    Type:            SHT_PROGBITS
34    Flags:           [ SHF_ALLOC ]
35    Address:         0x2000
36    AddressAlign:    0x4
37    Content:         DEADBEEFBAADF00D
38  - Name:            .overlap2
39    Type:            SHT_PROGBITS
40    Flags:           [ SHF_ALLOC ]
41    Address:         0x2004
42    AddressAlign:    0x4
43    Content:         DEADBEEFBAADF00D
44ProgramHeaders:
45  - Type: PT_LOAD
46    Flags: [ PF_X, PF_W, PF_R ]
47    VAddr: 0x1000
48    Align: 0x4
49    FirstSec: .sect1
50    LastSec:  .overlap1
51