summaryrefslogtreecommitdiff
path: root/test/ELF/progname.s
diff options
context:
space:
mode:
Diffstat (limited to 'test/ELF/progname.s')
-rw-r--r--test/ELF/progname.s30
1 files changed, 11 insertions, 19 deletions
diff --git a/test/ELF/progname.s b/test/ELF/progname.s
index 10cbf177c69b1..6d91823c94815 100644
--- a/test/ELF/progname.s
+++ b/test/ELF/progname.s
@@ -1,31 +1,23 @@
-// RUN: llvm-mc -filetype=obj -triple=i686-unknown-linux %s -o %t.o
+// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
// RUN: echo .global __progname > %t2.s
-// RUN: llvm-mc -filetype=obj -triple=i686-unknown-linux %t2.s -o %t2.o
+// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %t2.s -o %t2.o
// RUN: ld.lld -shared %t2.o -o %t2.so
// RUN: ld.lld -o %t %t.o %t2.so
// RUN: llvm-readobj -dyn-symbols %t | FileCheck %s
+// RUN: echo "VER_1 { global: bar; };" > %t.script
+// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux \
+// RUN: %p/Inputs/progname-ver.s -o %t-ver.o
+// RUN: ld.lld -shared -o %t.so -version-script %t.script %t-ver.o
+// RUN: ld.lld -o %t %t.o %t.so
+// RUN: llvm-readobj -dyn-symbols %t | FileCheck %s
-// Inputs/progname-ver.so consists of the assembly file
-//
-// .global bar
-// bar:
-// .quad __progname
-//
-// linked into a library with the version script
-//
-// VER_1 {
-// global:
-// bar;
-// };
-//
-// We should create it with lld itself once we it supports that.
-
-// RUN: ld.lld -o %t %t.o %p/Inputs/progname-ver.so
+// RUN: echo "{ _start; };" > %t.dynlist
+// RUN: ld.lld -dynamic-list %t.dynlist -o %t %t.o %t.so
// RUN: llvm-readobj -dyn-symbols %t | FileCheck %s
// CHECK: Name: __progname@
-// CHECK-NEXT: Value: 0x11000
+// CHECK-NEXT: Value: 0x201000
// CHECK-NEXT: Size: 0
// CHECK-NEXT: Binding: Global (0x1)
// CHECK-NEXT: Type: None (0x0)