17 lines · plain
1# REQUIRES: x862# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o3# RUN: not ld.lld %t.o -shared -o /dev/null 2>&1 | FileCheck %s4 5# CHECK: error: relocation R_X86_64_8 cannot be used against symbol 'foo'; recompile with -fPIC6# CHECK: error: relocation R_X86_64_16 cannot be used against symbol 'foo'; recompile with -fPIC7# CHECK: error: relocation R_X86_64_PC8 cannot be used against symbol 'foo'; recompile with -fPIC8# CHECK: error: relocation R_X86_64_PC16 cannot be used against symbol 'foo'; recompile with -fPIC9 10.global foo11 12.data13.byte foo # R_X86_64_814.short foo # R_X86_64_1615.byte foo - . # R_X86_64_PC816.short foo - . # R_X86_64_PC1617