Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ELF] - Fix for: bug 30237 - lld does not implement -f option
FreeBSD's libstdc++ build (used on tier-2 architectures) uses GNU ld's -f <name> option, which sets the DT_AUXILIARY field to the specified name. Multiple -f options may be specified and the DT_AUXILIARY entries will be added in the order in which they appear. Patch implements that option. Differential revision: https://reviews.llvm.org/D24139 llvm-svn: 280475
- Loading branch information
George Rimar
committed
Sep 2, 2016
1 parent
ed27d69
commit b952ece
Showing
5 changed files
with
23 additions
and
0 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
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
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,12 @@ | ||
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o | ||
# RUN: ld.lld %t.o -shared -f aaa --auxiliary bbb -o %t | ||
# RUN: llvm-readobj --dynamic-table %t | FileCheck %s | ||
|
||
# CHECK: DynamicSection [ | ||
# CHECK-NEXT: Tag Type Name/Value | ||
# CHECK-NEXT: 0x000000007FFFFFFD AUXILIARY Auxiliary library: [aaa] | ||
# CHECK-NEXT: 0x000000007FFFFFFD AUXILIARY Auxiliary library: [bbb] | ||
|
||
# RUN: not ld.lld %t.o -f aaa --auxiliary bbb -o %t 2>&1 \ | ||
# RUN: | FileCheck -check-prefix=ERR %s | ||
# ERR: -f may not be used without -shared |