2 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
3 # RUN: ld.lld -pie %t.o -o %t.pie
4 # RUN: llvm-readobj -r --dyn-syms %t.pie | FileCheck %s
6 ## Test that we create R_X86_64_RELATIVE relocations with -pie.
8 # CHECK-NEXT: Section ({{.*}}) .rela.dyn {
9 # CHECK-NEXT: 0x[[FOO_ADDR:.*]] R_X86_64_RELATIVE - 0x[[FOO_ADDR]]
10 # CHECK-NEXT: 0x[[#%X,BAR_ADDR:]] R_X86_64_RELATIVE
11 # CHECK-SAME: - 0x[[#BAR_ADDR]]
12 # CHECK-NEXT: 0x[[#BAR_ADDR + 8]] R_X86_64_RELATIVE - 0x[[#BAR_ADDR + 1]]