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
|
2020-02-13 13:48:45 +08:00
|
|
|
// RUN: not ld.lld -shared %t.o %t2.so -o /dev/null 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
|
|
|
|
2019-08-19 23:52:29 +08:00
|
|
|
// RUN: ld.lld --noinhibit-exec %t.o %t2.so -o /dev/null 2>&1 | FileCheck --check-prefix=WARN %s
|
|
|
|
// RUN: not ld.lld --export-dynamic --unresolved-symbols=ignore-all %t.o -o /dev/null 2>&1 | FileCheck --check-prefix=WARN %s
|
2018-01-09 08:13:54 +08:00
|
|
|
|
|
|
|
// WARN: symbol 'zed' has no type
|