[ELF] Make SyntheticSection parameter order match InputSection
[llvm-project.git] / lld / test / ELF / x86-64-reloc-error2.s
blobc2e1fd4d740604cead30739441a4654f3576a052
1 # REQUIRES: x86
2 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
3 # RUN: not ld.lld --entry=func --gc-sections %t.o -o /dev/null 2>&1 | FileCheck %s
5 ## Check we are able to find a function symbol that encloses
6 ## a given location when reporting error messages.
7 # CHECK: {{.*}}.o:(function func: .text.func+0x3): relocation R_X86_64_32S out of range: -281474974609120 is not in [-2147483648, 2147483647]; references 'func'
8 # CHECK-NEXT: >>> defined in {{.*}}.o
9 # CHECK-EMPTY:
11 # This mergeable section will be garbage collected. We had a crash issue in that case. Test it.
12 .section .rodata.str1,"aMS",@progbits,1
13 .asciz "a"
15 .section .text.func, "ax", %progbits
16 .globl func
17 .type func,@function
18 func:
19 movq $func - 0x1000000000000, %rdx
20 .size func, .-func