1// REQUIRES: x86
2// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
3// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/shared.s -o %t2.o
4// RUN: ld.lld %t2.o -shared -o %t2.so
5// RUN: not ld.lld -shared %t.o %t2.so -o /dev/null 2>&1 | FileCheck %s
6
7        .global _start
8_start:
9        .data
10        .long zed
11
12// CHECK: relocation R_X86_64_32 cannot be used against symbol zed; recompile with -fPIC
13
14// RUN: ld.lld --noinhibit-exec %t.o %t2.so -o /dev/null 2>&1 | FileCheck --check-prefix=WARN %s
15// RUN: not ld.lld --export-dynamic --unresolved-symbols=ignore-all %t.o -o /dev/null 2>&1 | FileCheck --check-prefix=WARN %s
16
17// WARN: symbol 'zed' has no type
18