2016-06-10 04:35:27 +08:00
|
|
|
// REQUIRES: x86
|
|
|
|
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
|
|
|
|
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/shared.s -o %t2.o
|
|
|
|
// RUN: ld.lld %t2.o -shared -o %t2.so
|
2017-12-28 08:23:49 +08:00
|
|
|
// RUN: not ld.lld -shared %t.o %t2.so -o %t 2>&1 | FileCheck %s
|
2016-06-10 04:35:27 +08:00
|
|
|
|
|
|
|
.global _start
|
|
|
|
_start:
|
|
|
|
.data
|
2017-12-25 03:02:10 +08:00
|
|
|
.long zed
|
2016-06-10 04:35:27 +08:00
|
|
|
|
2018-01-04 06:55:46 +08:00
|
|
|
// CHECK: relocation R_X86_64_32 cannot be used against symbol zed; recompile with -fPIC
|
2017-07-26 17:46:59 +08:00
|
|
|
|
2018-01-09 08:13:54 +08:00
|
|
|
// RUN: ld.lld --noinhibit-exec %t.o %t2.so -o %t 2>&1 | FileCheck --check-prefix=WARN %s
|
|
|
|
|
|
|
|
// WARN: symbol 'zed' has no type
|