Follow up to d0858bffa11, add missing REQUIRES x86
[llvm-project.git] / llvm / test / tools / yaml2obj / ELF / dynamic-relocations.yaml
blob8964877467f4a5ee4ca8e3169a342a85e8b17f0b
1 ## Show that yaml2obj uses the correct set of symbols for relocation sections
2 ## referencing the dynamic symbol table.
4 # RUN: yaml2obj %s -o %t
5 # RUN: llvm-readelf -r %t | FileCheck %s
7 # CHECK:      Relocation section '.rela.dyn' at offset {{.*}} contains 2 entries:
8 # CHECK-NEXT:     Offset             Info             Type      Symbol's Value  Symbol's Name
9 # CHECK-NEXT: 0000000000000000  0000000100000000 R_X86_64_NONE 0000000012345678 dynamic
10 # CHECK-NEXT: 0000000000000008  0000000200000000 R_X86_64_NONE 0000000087654321 both
11 # CHECK-EMPTY:
12 # CHECK-NEXT: Relocation section '.rela.data' at offset {{.*}} contains 2 entries:
13 # CHECK-NEXT:     Offset             Info             Type      Symbol's Value  Symbol's Name
14 # CHECK-NEXT: 0000000000000010  0000000200000000 R_X86_64_NONE 0000000011223344 static
15 # CHECK-NEXT: 0000000000000018  0000000100000000 R_X86_64_NONE 0000000088776655 both
17 !ELF
18 FileHeader:
19   Class:   ELFCLASS64
20   Data:    ELFDATA2LSB
21   Type:    ET_DYN
22   Machine: EM_X86_64
23 Sections:
24   - Name: .data
25     Type: SHT_PROGBITS
26   - Name: .rela.dyn
27     Type: SHT_REL
28     Link: .dynsym
29     Info: .data
30     Relocations:
31       - Type: R_X86_64_NONE
32         Symbol: dynamic
33       - Offset: 8
34         Type: R_X86_64_NONE
35         Symbol: both
36   - Name: .rela.data
37     Type: SHT_REL
38     Link: .symtab
39     Info: .data
40     Relocations:
41       - Offset: 16
42         Type: R_X86_64_NONE
43         Symbol: static
44       - Offset: 24
45         Type: R_X86_64_NONE
46         Symbol: both
47 Symbols:
48     - Name: both
49       Section: .data
50       Value: 0x88776655
51       Binding: STB_GLOBAL
52     - Name: static
53       Section: .data
54       Value: 0x11223344
55       Binding: STB_GLOBAL
56 DynamicSymbols:
57     - Name: dynamic
58       Section: .data
59       Value: 0x12345678
60       Binding: STB_GLOBAL
61     - Name: both
62       Section: .data
63       Value: 0x87654321
64       Binding: STB_GLOBAL