[ORC] Add std::tuple support to SimplePackedSerialization.
[llvm-project.git] / llvm / test / tools / llvm-objdump / X86 / elf-dynamic-relocs.test
blob6fae5b3328841f0887214e62e08d330e08d199b2
1 ## Show that llvm-objdump can dump dynamic relocations.
2 ## Specifically, we are checking that the tags DT_RELA, DT_REL and DT_JMPREL
3 ## properly identify relocation tables.
5 # RUN: yaml2obj %s -o %t
6 # RUN: llvm-objdump --dynamic-reloc %t | FileCheck %s
7 # RUN: llvm-objdump -R %t | FileCheck %s
9 # CHECK:      DYNAMIC RELOCATION RECORDS
10 # CHECK-NEXT: 0000000000000000 R_X86_64_RELATIVE *ABS*
11 # CHECK-NEXT: 0000000000000000 R_X86_64_JUMP_SLOT bar
12 # CHECK-NEXT: 0000000000000008 R_X86_64_NONE foo
13 # CHECK-EMPTY:
15 --- !ELF
16 FileHeader:
17   Class:   ELFCLASS64
18   Data:    ELFDATA2LSB
19   Type:    ET_DYN
20   Machine: EM_X86_64
21 Sections:
22   - Name:         .foo
23     Type:         SHT_PROGBITS
24     Size:         16
25     Flags:        [SHF_ALLOC]
26     Address:      0x100000
27     AddressAlign: 0x100
28   - Name:         .got.plt
29     Type:         SHT_PROGBITS
30     Flags:        [SHF_WRITE, SHF_ALLOC]
31     Address:      0x100100
32     AddressAlign: 0x1000
33   - Name:         .rela.dyn
34     Type:         SHT_RELA
35     Address:      0x100200
36     AddressAlign: 0x100
37     Info:         .foo
38     Link:         .dynsym
39     Flags:        [SHF_ALLOC]
40     Relocations:
41       - Offset: 0
42         Type:   R_X86_64_RELATIVE
43         Addend: 0
44   - Name:         .rela.plt
45     Type:         SHT_RELA
46     Address:      0x100300
47     AddressAlign: 0x100
48     Info:         .got.plt
49     Link:         .dynsym
50     Flags:        [SHF_ALLOC]
51     Relocations:
52       - Offset: 0
53         Symbol: bar
54         Type:   R_X86_64_JUMP_SLOT
55   - Name:         .rel.dyn
56     Type:         SHT_REL
57     Address:      0x100400
58     AddressAlign: 0x100
59     Info:         .foo
60     Link:         .dynsym
61     Flags:        [SHF_ALLOC]
62     Relocations:
63       - Offset: 8
64         Symbol: foo
65         Type:   R_X86_64_NONE
66   - Name:         .dynamic
67     Type:         SHT_DYNAMIC
68     Address:      0x100500
69     AddressAlign: 0x100
70     Link:         .dynstr
71     Flags:        [SHF_ALLOC]
72     Entries:
73       - Tag: DT_RELA
74         Value: 0x100200
75       - Tag: DT_RELASZ
76         Value: 24
77       - Tag: DT_RELAENT
78         Value: 24
79       - Tag: DT_JMPREL
80         Value: 0x100300
81       - Tag: DT_PLTREL
82         Value: 7
83       - Tag: DT_PLTRELSZ
84         Value: 24
85       - Tag: DT_REL
86         Value: 0x100400
87       - Tag: DT_RELSZ
88         Value: 16
89       - Tag: DT_RELENT
90         Value: 16
91       - Tag: DT_NULL
92         Value: 0
93 ProgramHeaders:
94   - Type:     PT_LOAD
95     VAddr:    0x100000
96     Align:    0x100
97     FirstSec: .foo
98     LastSec:  .dynamic
99   - Type:     PT_DYNAMIC
100     VAddr:    0x100500
101     Align:    0x100
102     FirstSec: .dynamic
103     LastSec:  .dynamic
104 DynamicSymbols:
105   - Name:    foo
106     Section: .foo
107     Binding: STB_GLOBAL
108   - Name:    bar
109     Type:    STT_FUNC
110     Binding: STB_GLOBAL