2018-06-06 21:56:51 +08:00
|
|
|
// REQUIRES: x86
|
2015-09-18 02:26:25 +08:00
|
|
|
// RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
|
|
|
|
// RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/shared.s -o %t2.o
|
2015-11-18 14:11:01 +08:00
|
|
|
// RUN: ld.lld -shared %t2.o -o %t2.so
|
|
|
|
// RUN: ld.lld %t.o %t2.so -o %t
|
2015-09-18 02:26:25 +08:00
|
|
|
// RUN: llvm-readobj -r %t | FileCheck %s
|
|
|
|
|
|
|
|
// We used to record the wrong symbol index for this test
|
|
|
|
|
|
|
|
// CHECK: Relocations [
|
2015-10-29 02:33:08 +08:00
|
|
|
// CHECK-NEXT: Section ({{.*}}) .rela.plt {
|
2019-09-06 23:10:31 +08:00
|
|
|
// CHECK-NEXT: {{.*}} R_X86_64_JUMP_SLOT bar 0x0
|
2015-09-18 02:26:25 +08:00
|
|
|
// CHECK-NEXT: }
|
|
|
|
// CHECK-NEXT: ]
|
|
|
|
|
|
|
|
.global foobar
|
|
|
|
foobar:
|
|
|
|
.global zedx
|
|
|
|
zedx:
|
|
|
|
.global _start
|
|
|
|
_start:
|
|
|
|
.quad bar
|