[ELF] Make SyntheticSection parameter order match InputSection
[llvm-project.git] / lld / test / ELF / arm-thumb-pc8-weak.s
blobb74182d4116e7507e5c5073a5cd0cf3bf715ca50
1 // REQUIRES: arm
2 // RUN: llvm-mc --arm-add-build-attributes -filetype=obj -triple=thumbv5-none-linux-gnueabi %s -o %t
3 // RUN: ld.lld %t -o %t2
4 // RUN: llvm-objdump --no-print-imm-hex --no-show-raw-insn -d %t2 | FileCheck %s
6 /// Check that the ARM ABI rules for undefined weak symbols are applied.
7 /// Relative relocations are resolved to the place. Although we can't encode
8 /// this for R_ARM_THM_PC8 as negative addends are not permitted. Use smallest
9 /// available value. These are corner cases.
10 .syntax unified
12 .weak target
13 .type target, %function
15 .text
16 .global _start
17 _start:
18 /// R_ARM_THM_PC8
19 /// adr r0, target
20 .inst.n 0xa0ff
21 .reloc 0, R_ARM_THM_PC8, target
22 /// ldr r0, target
23 .inst.n 0x48ff
24 .reloc 2, R_ARM_THM_PC8, target
25 // CHECK: 000200b4 <_start>:
26 // CHECK-NEXT: 200b4: adr r0, #0
27 // CHECK-NEXT: ldr r0, [pc, #0]