xref: /llvm-project/lldb/test/Shell/ObjectFile/ELF/i386-relocations.yaml (revision f4fc4056319dd8ddfb8759f71c7aec86882c9110)
1# RUN: yaml2obj %s -o %t
2# RUN: lldb-test object-file --contents %t | FileCheck %s
3#
4# CHECK-LABEL:  Name: .debug_info
5# CHECK:        Data: (
6# CHECK-NEXT:     0000: 22222222
7#
8# CHECK-LABEL:  Name: .debug_lines
9# CHECK:        Data: (
10# CHECK-NEXT:     0000: 33333333
11--- !ELF
12FileHeader:
13  Class:           ELFCLASS32
14  Data:            ELFDATA2LSB
15  Type:            ET_REL
16  Machine:         EM_386
17Sections:
18  - Name:            .data
19    Type:            SHT_PROGBITS
20    Flags:           [ SHF_WRITE, SHF_ALLOC ]
21    AddressAlign:    0x20
22  - Name:            .debug_info
23    Type:            SHT_PROGBITS
24    AddressAlign:    0x1
25    Content:         11111111
26  - Name:            .debug_lines
27    Type:            SHT_PROGBITS
28    AddressAlign:    0x1
29    Content:         99999999
30  - Name:            .rel.debug_info
31    Type:            SHT_REL
32    Flags:           [ SHF_INFO_LINK ]
33    Link:            .symtab
34    AddressAlign:    0x0
35    Info:            .debug_info
36    Relocations:
37      - Offset:          0x0
38        Symbol:          var
39        Type:            R_386_32
40  - Name:            .rela.debug_lines
41    Type:            SHT_RELA
42    Link:            .symtab
43    AddressAlign:    0x4
44    Info:            .debug_lines
45    Relocations:
46      - Offset:          0x0
47        Addend:          0x22222222
48        Symbol:          var
49        Type:            R_386_32
50Symbols:
51  - Name:            var
52    Type:            STT_OBJECT
53    Section:         .data
54    Binding:         STB_GLOBAL
55    Value:           0x11111111
56    Size:            0x5
57...
58