1# REQUIRES: x86
2
3# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
4# RUN: echo "SECTIONS { .data 0x2000 : { foo = .; *(.data) } }" > %t.script
5# RUN: ld.lld -pie -o %t --script %t.script %t.o
6# RUN: llvm-readobj -r %t | FileCheck %s
7
8## Position independent executables require dynamic
9## relocations for references to non-absolute script
10## symbols.
11
12# CHECK:      Relocations [
13# CHECK-NEXT:  Section ({{.*}}) .rela.dyn {
14# CHECK-NEXT:    0x2000 R_X86_64_RELATIVE - 0x2000
15# CHECK-NEXT:  }
16# CHECK-NEXT: ]
17
18.data
19.quad foo
20