Files
clang-p2996/lldb/test/Shell/ObjectFile/ELF/section-overlap.yaml
Jonas Devlieghere 87aa9c9e4d Re-land "[test] Split LLDB tests into API, Shell & Unit"
The original patch got reverted because it broke `check-lldb` on a clean
build. This fixes that.

llvm-svn: 374201
2019-10-09 19:22:02 +00:00

52 lines
1.4 KiB
YAML

# Test handling of (corrupt?) object files, which have sections with overlapping
# virtual addresses.
#
# Right now the overlapping sections get dropped, but other behaviors
# (including outright rejecting such files) are possible too.
# RUN: yaml2obj %s > %t
# RUN: lldb-test object-file %t | FileCheck %s
# CHECK-NOT: .overlap1
# CHECK-NOT: .overlap2
!ELF
FileHeader:
Class: ELFCLASS32
Data: ELFDATA2LSB
Type: ET_EXEC
Machine: EM_ARM
Sections:
- Name: .sect1
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC ]
Address: 0x1000
AddressAlign: 0x4
Content: DEADBEEFBAADF00D
- Name: .overlap1
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC ]
Address: 0x1004
AddressAlign: 0x4
Content: DEADBEEFBAADF00D
- Name: .sect2
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC ]
Address: 0x2000
AddressAlign: 0x4
Content: DEADBEEFBAADF00D
- Name: .overlap2
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC ]
Address: 0x2004
AddressAlign: 0x4
Content: DEADBEEFBAADF00D
ProgramHeaders:
- Type: PT_LOAD
Flags: [ PF_X, PF_W, PF_R ]
VAddr: 0x1000
Align: 0x4
Sections:
- Section: .sect1
- Section: .overlap1