2017-08-02 15:51:08 +08:00
|
|
|
# REQUIRES: x86
|
2019-09-09 11:35:14 +08:00
|
|
|
|
|
|
|
## --unresolved-symbols=ignore-all behaves similar to -shared:
|
2020-04-02 00:21:08 +08:00
|
|
|
## for PLT relocations to undefined symbols, produce dynamic relocations if we
|
2019-09-09 11:35:14 +08:00
|
|
|
## emit .dynsym.
|
|
|
|
|
|
|
|
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
|
|
|
|
# RUN: ld.lld %t.o -o %t --unresolved-symbols=ignore-all -pie
|
|
|
|
# RUN: llvm-readobj -r %t | FileCheck %s
|
|
|
|
# RUN: ld.lld %t.o -o %t --unresolved-symbols=ignore-all --export-dynamic
|
|
|
|
# RUN: llvm-readobj -r %t | FileCheck %s
|
2017-08-02 15:51:08 +08:00
|
|
|
|
|
|
|
# CHECK: Relocations [
|
|
|
|
# CHECK-NEXT: Section ({{.*}}) .rela.plt {
|
2019-09-09 11:35:14 +08:00
|
|
|
# CHECK-NEXT: R_X86_64_JUMP_SLOT foo 0x0
|
2017-08-02 15:51:08 +08:00
|
|
|
# CHECK-NEXT: }
|
|
|
|
# CHECK-NEXT: ]
|
|
|
|
|
|
|
|
_start:
|
|
|
|
callq foo@PLT
|