[PATCH] D57899: [LLD][ELF]Add test for missing thin archive member

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 8 02:31:56 PST 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL353508: [LLD][ELF]Add test for missing thin archive member (authored by jhenderson, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D57899?vs=185782&id=185931#toc

Repository:
  rL LLVM

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

https://reviews.llvm.org/D57899

Files:
  lld/trunk/test/ELF/archive-thin-missing-member.s


Index: lld/trunk/test/ELF/archive-thin-missing-member.s
===================================================================
--- lld/trunk/test/ELF/archive-thin-missing-member.s
+++ lld/trunk/test/ELF/archive-thin-missing-member.s
@@ -0,0 +1,24 @@
+# REQUIRES: x86
+
+# RUN: rm -f %t-no-syms.a
+# RUN: rm -f %t-syms.a
+# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
+# RUN: llvm-ar rcTS %t-no-syms.a %t.o
+# RUN: llvm-ar rcT %t-syms.a %t.o
+# RUN: rm %t.o
+
+# Test error when loading symbols from missing thin archive member.
+# RUN: not ld.lld %t-no-syms.a 2>&1 | FileCheck %s --check-prefix=ERR1
+# ERR1: {{.*}}-no-syms.a: could not get the buffer for a child of the archive: '{{.*}}.o': {{[Nn]}}o such file or directory
+
+# Test error when thin archive has symbol table but member is missing.
+# RUN: not ld.lld -m elf_amd64_fbsd %t-syms.a 2>&1 | FileCheck %s --check-prefix=ERR2
+# ERR2: {{.*}}-syms.a: could not get the buffer for the member defining symbol _start: '{{.*}}.o': {{[Nn]}}o such file or directory
+
+# Test error when thin archive is linked using --whole-archive but member is missing.
+# RUN: not ld.lld --whole-archive %t-syms.a 2>&1 | FileCheck %s --check-prefix=ERR3
+# ERR3: {{.*}}-syms.a: could not get the buffer for a child of the archive: '{{.*}}.o': {{[Nn]}}o such file or directory
+
+.global _start
+_start:
+    nop


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57899.185931.patch
Type: text/x-patch
Size: 1366 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190208/465ebf37/attachment.bin>


More information about the llvm-commits mailing list