1; REQUIRES: x86
2
3; RUN: opt -module-summary %s -o %t1.o
4; RUN: opt -module-summary %p/Inputs/obj-path.ll -o %t2.o
5
6; Test to ensure that obj-path creates the ELF file.
7; RUN: rm -f %t4.o
8; RUN: ld.lld --plugin-opt=obj-path=%t4.o -shared %t1.o %t2.o -o %t3
9; RUN: llvm-nm %t3 | FileCheck %s
10; RUN: llvm-readobj -h %t4.o1 | FileCheck %s -check-prefix=ELF1
11; RUN: llvm-readobj -h %t4.o2 | FileCheck %s -check-prefix=ELF2
12; RUN: llvm-nm %t4.o1 2>&1 | FileCheck %s -check-prefix=NM1
13; RUN: llvm-nm %t4.o2 2>&1 | FileCheck %s -check-prefix=NM2
14
15; CHECK:      T f
16; CHECK-NEXT: T g
17
18; NM1: T f
19; ELF1: Format: elf64-x86-64
20
21; NM2: T g
22; ELF2: Format: elf64-x86-64
23
24target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
25target triple = "x86_64-unknown-linux-gnu"
26
27declare void @g(...)
28
29define void @f() {
30entry:
31  call void (...) @g()
32  ret void
33}
34