xref: /llvm-project/lld/test/ELF/lto/dynamic-list.ll (revision 7b1d793713cf9ed9ab719f33b332f9c66a1fc5cc)
1; REQUIRES: x86
2
3;; Test we parse dynamic lists before LTO, so symbols can be exported correctly.
4
5; RUN: llvm-as %s -o %t.o
6; RUN: echo "{ foo; };" > %t.list
7; RUN: ld.lld -o %t --dynamic-list %t.list -pie %t.o
8; RUN: llvm-readobj --dyn-syms %t | FileCheck %s
9
10; CHECK:      Name:     foo
11; CHECK-NEXT: Value:
12; CHECK-NEXT: Size:     1
13; CHECK-NEXT: Binding:  Global (0x1)
14; CHECK-NEXT: Type:     Function
15; CHECK-NEXT: Other:    0
16; CHECK-NEXT: Section:  .text
17; CHECK-NEXT: }
18
19target triple = "x86_64-unknown-linux-gnu"
20target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
21
22define void @_start() {
23  ret void
24}
25
26define void @foo() {
27  ret void
28}
29