Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ELF] Error on archive with missing index
This matches the wasm lld and GNU ld behavior. The ELF linker has special handling for bitcode archives but if that doesn't kick in we probably want to error out rather than silently ignore the library. Differential Revision: https://reviews.llvm.org/D63781 llvm-svn: 364998
- Loading branch information
Showing
3 changed files
with
17 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# REQUIRES: x86 | ||
# Tests error on archive file without a symbol table | ||
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux -o %t.o %s | ||
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux -o %t.archive.o %S/Inputs/archive.s | ||
# RUN: rm -f %t.a | ||
# RUN: llvm-ar crS %t.a %t.archive.o | ||
|
||
# RUN: not ld.lld -o out.wasm %t.o %t.a 2>&1 | FileCheck %s | ||
|
||
.globl _start | ||
_start: | ||
|
||
# CHECK: error: {{.*}}.a: archive has no index; run ranlib to add one |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters