[ELF] Make SyntheticSection parameter order match InputSection
[llvm-project.git] / lld / test / ELF / relocation-b-aarch64.test
blob8190730a9f30c0e8a8d0320b9360011913f0a8d1
1 # REQUIRES: aarch64
3 # RUN: yaml2obj %s -o %t.o
4 # RUN: ld.lld %t.o -o %t.out
5 # RUN: llvm-objdump -d --no-show-raw-insn %t.out | FileCheck %s
7 # Check that the R_AARCH64_JUMP26 writes the branch opcode as well as the
8 # immediate. We use this property to overwrite instructions with a branch.
10 # CHECK: Disassembly of section .text:
11 # CHECK-EMPTY:
12 # CHECK-NEXT: <foo>:
13 # CHECK-NEXT:    210120:       b       0x210124
14 # CHECK: <bar>:
15 # CHECK-NEXT:    210124:       b       0x210120
17 !ELF
18 FileHeader:
19   Class:           ELFCLASS64
20   Data:            ELFDATA2LSB
21   Type:            ET_REL
22   Machine:         EM_AARCH64
23 Sections:
24   - Type:            SHT_PROGBITS
25     Name:            .text
26     Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
27     Content:         "0000000000000000"
28   - Type:            SHT_RELA
29     Name:            .rela.text
30     Link:            .symtab
31     Info:            .text
32     Relocations:
33       - Symbol:          bar
34         Type:            R_AARCH64_JUMP26
35       - Offset:          4
36         Symbol:          foo
37         Type:            R_AARCH64_JUMP26
39 Symbols:
40   - Type:             STT_FUNC
41     Section:          .text
42     Name:             foo
43     Value:            0
44   - Type:             STT_FUNC
45     Section:          .text
46     Name:             bar
47     Value:            4