|
1 |
| -# Overlapping PT_LOAD and PT_TLS segments should be able to exist side by side. |
| 1 | +# Overlapping PT_LOAD and PT_TLS segments in an object file should be able to |
| 2 | +# exist side by side. |
| 3 | + |
| 4 | +# When an ELF file contains both PT_LOAD and PT_TLS segments where the PT_TLS |
| 5 | +# segment has the same p_vaddr and p_paddr as a PT_LOAD segment, this |
| 6 | +# was causing LLDB, when loading a ELF object file at an address, to overwrite |
| 7 | +# the section load address for a PT_LOAD that shares the same p_vaddr value in |
| 8 | +# the section load list's addr to section map for this code. This test ensures |
| 9 | +# that no PT_TLS segments get loaded and can't interfere with real segments we |
| 10 | +# need to resolved as all access to thread specific memory is only done via |
| 11 | +# DWARF location expressions. We also don't have any code that loads any thread |
| 12 | +# specific segments at a different address for different threads, so there is |
| 13 | +# no reason currently to try and load thread specific segments. |
2 | 14 |
|
3 | 15 | # RUN: yaml2obj %s -o %t
|
4 | 16 | # RUN: lldb-test object-file %t | FileCheck %s
|
5 |
| -# RUN: %lldb %t -o "image lookup -a 0x1000" -b | FileCheck --check-prefix=LOOKUP %s |
| 17 | + |
6 | 18 |
|
7 | 19 | # CHECK: Index: 0
|
8 | 20 | # CHECK-NEXT: ID: 0xffffffffffffffff
|
|
26 | 38 | # CHECK-NEXT: File size: 0
|
27 | 39 | # CHECK-NEXT: Showing 1 subsections
|
28 | 40 |
|
| 41 | +# RUN: %lldb %t -b \ |
| 42 | +# RUN: -o "image lookup -a 0x1000" \ |
| 43 | +# RUN: -o "target modules load --file %t --slide 0" \ |
| 44 | +# RUN: -o "image lookup -a 0x1000" \ |
| 45 | +# RUN: -o "target dump section-load-list" \ |
| 46 | +# RUN: | FileCheck --check-prefix=LOOKUP %s |
| 47 | + |
29 | 48 | # LOOKUP-LABEL: image lookup -a 0x1000
|
30 | 49 | # LOOKUP: Address: {{.*}}.PT_LOAD[0]..data + 0)
|
| 50 | +# LOOKUP: target modules load |
| 51 | +# LOOKUP: image lookup -a 0x1000 |
| 52 | +# LOOKUP: Address: {{.*}}.PT_LOAD[0]..data + 0) |
| 53 | +# LOOKUP: target dump section-load-list |
| 54 | +# LOOKUP: PT_TLS-overlap-PT_LOAD.yaml.tmp.PT_LOAD[0] |
| 55 | +# LOOKUP-NOT: PT_TLS-overlap-PT_LOAD.yaml.tmp.PT_TLS[0] |
31 | 56 |
|
32 | 57 | !ELF
|
33 | 58 | FileHeader:
|
|
0 commit comments