zig/deps/lld/test/ELF/allow-shlib-undefined.s
Andrew Kelley 4794281d64 embed LLD 5.0.0
This is 48aaa9f66120f72b5d7e4a90b32fee40a3386ce9 from the
git monorepo.
2017-08-27 17:46:59 -04:00

27 lines
959 B
ArmAsm

# REQUIRES: x86
# --allow-shlib-undefined and --no-allow-shlib-undefined are fully
# ignored in linker implementation.
# --allow-shlib-undefined is set by default
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux \
# RUN: %p/Inputs/allow-shlib-undefined.s -o %t
# RUN: ld.lld -shared %t -o %t.so
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1
# Executable: should link with DSO containing undefined symbols in any case.
# RUN: ld.lld %t1 %t.so -o %t2
# RUN: ld.lld --no-allow-shlib-undefined %t1 %t.so -o %t2
# RUN: ld.lld --allow-shlib-undefined %t1 %t.so -o %t2
# DSO with undefines:
# should link with or without any of these options.
# RUN: ld.lld -shared %t -o %t.so
# RUN: ld.lld -shared --allow-shlib-undefined %t -o %t.so
# RUN: ld.lld -shared --no-allow-shlib-undefined %t -o %t.so
# Executable still should not link when have undefines inside.
# RUN: not ld.lld %t -o %t.so
.globl _start
_start:
callq _shared@PLT