xref: /llvm-project/lld/test/ELF/x86-64-pc32-overflow-large.s (revision 1d4c0092a82aa351c5a6e9e501cc5edbc6c0477f)
1# REQUIRES: x86
2# RUN: split-file %s %t
3# RUN: llvm-mc -filetype=obj -triple=x86_64 %t/a.s -o %t/a.o
4# RUN: not ld.lld %t/a.o -T %t/lds -o /dev/null 2>&1 | FileCheck %s
5
6# CHECK: error: {{.*}}a.o:(.text+{{.*}}): relocation R_X86_64_PC32 out of range: {{.*}}; R_X86_64_PC32 should not reference a section marked SHF_X86_64_LARGE
7
8#--- a.s
9.text
10.globl _start
11.type _start, @function
12_start:
13  movq hello(%rip), %rax
14
15.section ldata,"awl",@progbits
16.type   hello, @object
17.globl  hello
18hello:
19.long   1
20
21#--- lds
22SECTIONS {
23  .text 0x100000 : { *(.text) }
24  ldata 0x80200000 : { *(ldata) }
25}
26