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
|
2018-07-03 01:48:23 +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
|
|
|
|
2021-11-01 03:10:42 +08:00
|
|
|
// CHECK: error: relocation R_X86_64_PC32 cannot be used against symbol 'zed'; recompile with -fPIC
|
2017-04-04 05:36:31 +08:00
|
|
|
// CHECK: >>> defined in {{.*}}.so
|
|
|
|
// CHECK: >>> referenced by {{.*}}.o:(.data+0x0)
|
|
|
|
|
2016-06-10 04:35:27 +08:00
|
|
|
.global _start
|
|
|
|
_start:
|
|
|
|
.data
|
2017-12-25 03:02:10 +08:00
|
|
|
.long zed - .
|