File: allow-shlib-undefined.s

package info (click to toggle)
llvm-toolchain-6.0 1%3A6.0.1-10
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 598,080 kB
  • sloc: cpp: 3,046,253; ansic: 595,057; asm: 271,965; python: 128,926; objc: 106,554; sh: 21,906; lisp: 10,191; pascal: 6,094; ml: 5,544; perl: 5,265; makefile: 2,227; cs: 2,027; xml: 686; php: 212; csh: 117
file content (26 lines) | stat: -rw-r--r-- 959 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# 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