[X86][MC,LLD][NFC] Rename R_X86_64_REX2_GOTPCRELX (#116737)
[llvm-project.git] / lld / test / wasm / section-symbol-relocs.yaml
blob050aaa602a8f2832de798fdbd04348b036ec9d7b
1 # RUN: yaml2obj %s -o %t.o
2 # RUN: llc -filetype=obj  %S/Inputs/custom.ll -o %t2.o
3 # RUN: wasm-ld --no-entry -o - %t2.o %t.o | obj2yaml | FileCheck %s
4 # RUN: wasm-ld -r --no-entry -o - %t2.o %t.o | obj2yaml | FileCheck %s -check-prefix=RELOC
6 --- !WASM
7 FileHeader:
8   Version:         0x00000001
9 Sections:
10   - Type:            CUSTOM
11     Name:            green
12     Payload:         'AA0000000000000000'
13     Relocations:
14       - Type:            R_WASM_SECTION_OFFSET_I32
15         Index:           0
16         Offset:          0x00000001
17       - Type:            R_WASM_SECTION_OFFSET_I32
18         Index:           1
19         Offset:          0x00000005
20   - Type:            CUSTOM
21     Name:            red
22     Payload:         'BB0000000000000000'
23   - Type:            CUSTOM
24     Name:            linking
25     Version:         2
26     SymbolTable:
27       - Index:           0
28         Kind:            SECTION
29         Section:         0
30         Flags:           [ BINDING_LOCAL ]
31       - Index:           1
32         Kind:            SECTION
33         Section:         1
34         Flags:           [ BINDING_LOCAL ]
35 ...
37 # CHECK:        Name:            red
38 # CHECK-NEXT:   Payload:         666F6FBB0000000000000000
39 # CHECK:        Name:            green
40 # CHECK-NEXT:   Payload:         626172717578AA0600000003000000
42 # RELOC:        Relocations:
43 # RELOC-NEXT:       - Type:            R_WASM_SECTION_OFFSET_I32
44 # RELOC-NEXT:         Index:           1
45 # RELOC-NEXT:         Offset:          0x7
46 # RELOC-NEXT:         Addend:          6
47 # RELOC-NEXT:       - Type:            R_WASM_SECTION_OFFSET_I32
48 # RELOC-NEXT:         Index:           0
49 # RELOC-NEXT:         Offset:          0xB
50 # RELOC-NEXT:         Addend:          3
51 # RELOC-NEXT:    Name:            green
53 # RELOC:        SymbolTable:
54 # RELOC-NEXT:     - Index:           0
55 # RELOC-NEXT:       Kind:            SECTION
56 # RELOC-NEXT:       Flags:           [ BINDING_LOCAL ]
57 # RELOC-NEXT:       Section:         1
58 # RELOC-NEXT:     - Index:           1
59 # RELOC-NEXT:       Kind:            SECTION
60 # RELOC-NEXT:       Flags:           [ BINDING_LOCAL ]
61 # RELOC-NEXT:       Section:         2