[ELF] Make SyntheticSection parameter order match InputSection
[llvm-project.git] / lld / test / ELF / loongarch-add-sub.s
blob35f8a053d69cef38c9d18ac1a0b827cf79ce2526
1 # REQUIRES: loongarch
3 # RUN: llvm-mc --filetype=obj --triple=loongarch64-unknown-elf %s -o %t.la64.o
5 # RUN: ld.lld --section-start=.text=0x1234567890 --section-start=.rodata=0x9876543210 %t.la64.o -o %t.la64
6 # RUN: llvm-readelf -x .rodata %t.la64 | FileCheck --check-prefix=CHECK %s
7 # CHECK: section '.rodata':
8 # CHECK-NEXT: 0x9876543210 10325476 98badcfe 804602be 79ffffff
9 # CHECK-NEXT: 0x9876543220 804602be 80468097
11 .text
12 .global _start
13 _start:
15 break 0
17 .rodata
19 .dword 0xfedcba9876543210
21 foo:
22 .dword 0
23 .reloc foo, R_LARCH_ADD64, 1b
24 .reloc foo, R_LARCH_SUB64, 2b
25 bar:
26 .word 0
27 .reloc bar, R_LARCH_ADD32, 1b
28 .reloc bar, R_LARCH_SUB32, 2b
29 baz:
30 .short 0
31 .reloc baz, R_LARCH_ADD16, 1b
32 .reloc baz, R_LARCH_SUB16, 2b
33 quux:
34 .byte 0
35 .reloc quux, R_LARCH_ADD8, 1b
36 .reloc quux, R_LARCH_SUB8, 2b
37 qux:
38 .byte 0b10000000
39 .reloc qux, R_LARCH_ADD6, qux
40 .reloc qux, R_LARCH_SUB6, 2b