From c1d043c40a010a5677d731f1f3cdaedb07f8529f Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Mon, 24 Apr 2017 23:51:18 +0000 Subject: [PATCH] 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. llvm-svn: 301279 --- lld/test/ELF/Inputs/progname-ver.s | 3 +++ lld/test/ELF/Inputs/progname-ver.so | Bin 1680 -> 0 bytes lld/test/ELF/progname.s | 28 ++++++++-------------------- 3 files changed, 11 insertions(+), 20 deletions(-) create mode 100644 lld/test/ELF/Inputs/progname-ver.s delete mode 100755 lld/test/ELF/Inputs/progname-ver.so diff --git a/lld/test/ELF/Inputs/progname-ver.s b/lld/test/ELF/Inputs/progname-ver.s new file mode 100644 index 0000000..06fc294 --- /dev/null +++ b/lld/test/ELF/Inputs/progname-ver.s @@ -0,0 +1,3 @@ +.global bar +bar: +.quad __progname@GOT diff --git a/lld/test/ELF/Inputs/progname-ver.so b/lld/test/ELF/Inputs/progname-ver.so deleted file mode 100755 index e6bb3228f6c6577e18598ba3c9ba112e8bf82c79..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1680 zcmb7E&1w@-82zTLwYEi5e|CxyL_~0CYDE`I=LMUk$= zMIXS0JNp1WipxHP-7E2&JM*P+R`$Tj_j|v&_s*Gos5R=2>5`j-^0d}86=`{~7!$=|yYKY^ zF@f);9x|;YF-hvhDN=o3aFZg(LGGJpFYcZ9#Iq9Y%_0Z)=h%GaIdZr8eV%7J59-}! zYaO|?_hNKj-FFvfoyK6!jNs#n?^KF+xXa=$MT{~8X% zFR;I1zry~3)qSJoNZ|WcVBU~EpK~I&tLsms9d`Y4#jR9WEC7$UnxP(?i5a_Bo^jsB zvr>jt@ZIrUk89(a7GZhjo8Y)M?iAt&g;>n}=j+wAhxf#+Ha1qO4YN_NKdx<>&FV^{ zW{#*3Hx1sV;v5%S~7vXE2^GLo=$j0iAnj}w-^>ID<3{;&`v*hi(#yV#a7eH!{IesG~ zzY!P<_G!!g;ynV+Q)u5`gXg+j diff --git a/lld/test/ELF/progname.s b/lld/test/ELF/progname.s index 10cbf17..a8837da 100644 --- a/lld/test/ELF/progname.s +++ b/lld/test/ELF/progname.s @@ -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) -- 2.7.4