[lld] r301279 - Replace a binary .so with a text .s.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 24 16:51:18 PDT 2017
Author: ruiu
Date: Mon Apr 24 18:51:18 2017
New Revision: 301279
URL: http://llvm.org/viewvc/llvm-project?rev=301279&view=rev
Log:
Replace a binary .so with a text .s.
Since LLD is now able to take version scripts, we no longer
have to keep a pre-generated binary file for a test.
Added:
lld/trunk/test/ELF/Inputs/progname-ver.s
Removed:
lld/trunk/test/ELF/Inputs/progname-ver.so
Modified:
lld/trunk/test/ELF/progname.s
Added: lld/trunk/test/ELF/Inputs/progname-ver.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/Inputs/progname-ver.s?rev=301279&view=auto
==============================================================================
--- lld/trunk/test/ELF/Inputs/progname-ver.s (added)
+++ lld/trunk/test/ELF/Inputs/progname-ver.s Mon Apr 24 18:51:18 2017
@@ -0,0 +1,3 @@
+.global bar
+bar:
+.quad __progname at GOT
Removed: lld/trunk/test/ELF/Inputs/progname-ver.so
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/Inputs/progname-ver.so?rev=301278&view=auto
==============================================================================
Binary files lld/trunk/test/ELF/Inputs/progname-ver.so (original) and lld/trunk/test/ELF/Inputs/progname-ver.so (removed) differ
Modified: lld/trunk/test/ELF/progname.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/progname.s?rev=301279&r1=301278&r2=301279&view=diff
==============================================================================
--- lld/trunk/test/ELF/progname.s (original)
+++ lld/trunk/test/ELF/progname.s Mon Apr 24 18:51:18 2017
@@ -1,31 +1,19 @@
-// 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
-
-// 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 "VER_1 { global: bar; };" > %s.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 %s.script %t-ver.o
+// RUN: ld.lld -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)
More information about the llvm-commits
mailing list