With fix for undefined weak symbols in executable. Original commit message: This is PR32112. Previously when we linked executable with --unresolved-symbols=ignore-all and undefined symbols, like: _start: callq und@PLT we did not create relocations, though it looks in that case we should delegate handling of such symbols to runtime linker, hence should emit them. Patch fixes that. Differential revision: https://reviews.llvm.org/D35724 llvm-svn: 309796
14 lines
373 B
ArmAsm
14 lines
373 B
ArmAsm
# REQUIRES: x86
|
|
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
|
|
# RUN: ld.lld %t -o %tout --unresolved-symbols=ignore-all -pie
|
|
# RUN: llvm-readobj -r %tout | FileCheck %s
|
|
|
|
# CHECK: Relocations [
|
|
# CHECK-NEXT: Section ({{.*}}) .rela.plt {
|
|
# CHECK-NEXT: 0x2018 R_X86_64_JUMP_SLOT foo 0x0
|
|
# CHECK-NEXT: }
|
|
# CHECK-NEXT: ]
|
|
|
|
_start:
|
|
callq foo@PLT
|