• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Overlapping PT_LOAD and PT_TLS segments should be able to exist side by side.
2
3# RUN: yaml2obj %s -o %t
4# RUN: lldb-test object-file %t | FileCheck %s
5# RUN: %lldb %t -o "image lookup -a 0x1000" -b | FileCheck --check-prefix=LOOKUP %s
6
7# CHECK:        Index: 0
8# CHECK-NEXT:   ID: 0xffffffffffffffff
9# CHECK-NEXT:   Name: PT_LOAD[0]
10# CHECK-NEXT:   Type: container
11# CHECK-NEXT:   Permissions: rw-
12# CHECK-NEXT:   Thread specific: no
13# CHECK-NEXT:   VM address: 0x1000
14# CHECK-NEXT:   VM size: 16
15# CHECK-NEXT:   File size: 16
16# CHECK-NEXT:   Showing 1 subsections
17
18# CHECK:        Index: 1
19# CHECK-NEXT:   ID: 0xfffffffffffffffe
20# CHECK-NEXT:   Name: PT_TLS[0]
21# CHECK-NEXT:   Type: container
22# CHECK-NEXT:   Permissions: rw-
23# CHECK-NEXT:   Thread specific: yes
24# CHECK-NEXT:   VM address: 0x1000
25# CHECK-NEXT:   VM size: 16
26# CHECK-NEXT:   File size: 0
27# CHECK-NEXT:   Showing 1 subsections
28
29# LOOKUP-LABEL: image lookup -a 0x1000
30# LOOKUP:       Address: {{.*}}.PT_LOAD[0]..data + 0)
31
32!ELF
33FileHeader:
34  Class:           ELFCLASS32
35  Data:            ELFDATA2LSB
36  Type:            ET_EXEC
37  Machine:         EM_ARM
38Sections:
39  - Name:            .data
40    Type:            SHT_PROGBITS
41    Flags:           [ SHF_ALLOC, SHF_WRITE ]
42    Address:         0x1000
43    AddressAlign:    0x4
44    Size:            0x10
45  - Name:            .tbss
46    Type:            SHT_NOBITS
47    Flags:           [ SHF_ALLOC, SHF_WRITE, SHF_TLS ]
48    Address:         0x1000
49    AddressAlign:    0x4
50    Size:            0x10
51ProgramHeaders:
52  - Type: PT_LOAD
53    Flags: [ PF_W, PF_R ]
54    VAddr: 0x1000
55    Align: 0x4
56    FirstSec: .data
57    LastSec:  .data
58  - Type: PT_TLS
59    Flags: [ PF_R, PF_W ]
60    VAddr: 0x1000
61    Align: 0x4
62    FirstSec: .tbss
63    LastSec:  .tbss
64