[PATCH] D77659: [ELF][test] Add reproduce test for dependent libraries

Andrew Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 7 14:10:53 PDT 2020


andrewng updated this revision to Diff 255800.
andrewng added a comment.

Updated to address review comments.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77659/new/

https://reviews.llvm.org/D77659

Files:
  lld/test/ELF/reproduce-deplibs.s


Index: lld/test/ELF/reproduce-deplibs.s
===================================================================
--- /dev/null
+++ lld/test/ELF/reproduce-deplibs.s
@@ -0,0 +1,19 @@
+# REQUIRES: x86
+
+# RUN: rm -rf %t.dir
+# RUN: mkdir -p %t.dir
+# RUN: cd %t.dir
+# RUN: echo ".global foo; foo: ret" | \
+# RUN:   llvm-mc -filetype=obj -triple=x86_64 - -o foo.o
+# RUN: llvm-ar rc foo.a foo.o
+# RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o bar.o
+
+# RUN: ld.lld bar.o -o /dev/null --reproduce repro.tar
+# RUN: tar xf repro.tar
+# RUN: cmp foo.a repro/%:t.dir/foo.a
+
+.globl _start
+_start:
+  call foo
+.section ".deplibs","MS", at llvm_dependent_libraries,1
+.asciz "foo.a"


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77659.255800.patch
Type: text/x-patch
Size: 675 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200407/a2a61e20/attachment.bin>


More information about the llvm-commits mailing list