xref: /llvm-project/lld/test/ELF/lto/keep-undefined.ll (revision 7b1d793713cf9ed9ab719f33b332f9c66a1fc5cc)
1; REQUIRES: x86
2; This test checks that symbols which are specified in "-u" switches
3; are kept over LTO if we link an executable.
4; RUN: llvm-as %s -o %t.o
5; RUN: ld.lld %t.o -o %tout -u foo
6; RUN: llvm-nm %tout | FileCheck %s
7
8; CHECK: T foo
9
10target triple = "x86_64-unknown-linux-gnu"
11target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
12
13define void @foo() {
14  ret void
15}
16
17define void @_start() {
18  call void @foo()
19  ret void
20}
21