2 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
3 # RUN: not ld.lld %t.o -shared -o /dev/null 2>&1 | FileCheck %s
5 # CHECK: error: relocation R_X86_64_8 cannot be used against symbol 'foo'; recompile with -fPIC
6 # CHECK: error: relocation R_X86_64_16 cannot be used against symbol 'foo'; recompile with -fPIC
7 # CHECK: error: relocation R_X86_64_PC8 cannot be used against symbol 'foo'; recompile with -fPIC
8 # CHECK: error: relocation R_X86_64_PC16 cannot be used against symbol 'foo'; recompile with -fPIC
13 .byte foo # R_X86_64_8
14 .short foo # R_X86_64_16
15 .byte foo - . # R_X86_64_PC8
16 .short foo - . # R_X86_64_PC16