29 lines · plain
1// REQUIRES: x862// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o3// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/protected-shared.s -o %t2.o4// RUN: ld.lld %t2.o -o %t2.so -shared5// RUN: not ld.lld %t.o %t2.so -o /dev/null 2>&1 | FileCheck %s6 7// CHECK: error: cannot preempt symbol: bar8// CHECK: >>> defined in {{.*}}.so9// CHECK: >>> referenced by {{.*}}.o:(.text+0x1)10 11// CHECK: error: relocation R_X86_64_PC32 cannot be used against symbol 'zed'; recompile with -fPIC12// CHECK-NEXT: >>> defined in {{.*}}.so13// CHECK-NEXT: >>> referenced by {{.*}}.o:(.text+0x6)14 15// RUN: ld.lld --noinhibit-exec %t.o %t2.so -o %t 2>&1 | FileCheck %s --check-prefix=NOINHIBIT16// NOINHIBIT: warning: cannot preempt symbol: bar17// NOINHIBIT-NEXT: >>> defined in {{.*}}.so18// NOINHIBIT-NEXT: >>> referenced by {{.*}}.o:(.text+0x1)19// NOINHIBIT: warning: relocation R_X86_64_PC32 cannot be used against symbol 'zed'; recompile with -fPIC20// NOINHIBIT-NEXT: >>> defined in {{.*}}.so21// NOINHIBIT-NEXT: >>> referenced by {{.*}}.o:(.text+0x6)22 23.global _start24_start:25.byte 0xe826.long bar - .27.byte 0xe828.long zed - .29