summaryrefslogtreecommitdiffstats
path: root/lld/test/ELF/shlib-undefined-archive.s
blob: 940d8d7bc0c51a9af3e4bc0f8dba657b903df360 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# REQUIRES: x86

# Undefined symbols in a DSO should pull out object files from archives
# to resolve them.

# RUN: echo '.globl foo' | llvm-mc -filetype=obj -triple=x86_64-linux-gnu -o %t1.o -
# RUN: ld.lld -shared -o %t.so %t1.o

# RUN: llvm-mc -filetype=obj -triple=x86_64-linux-gnu -o %t2.o %s
# RUN: rm -f %t.a
# RUN: llvm-ar cru %t.a %t2.o
# RUN: ld.lld -o %t.exe %t.so %t.a
# RUN: llvm-nm -D %t.exe | FileCheck %s

# CHECK: T foo

.globl foo
foo:
  ret
OpenPOWER on IntegriCloud