-
Notifications
You must be signed in to change notification settings - Fork 12k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[LLD] [COFF] Add support for a new, mingw specific embedded directive…
… -exclude-symbols: This is an entirely new embedded directive - extending the GNU ld command line option --exclude-symbols to be usable in embedded directives too. (GNU ld.bfd also got support for the same new directive, currently in the latest git version, after the 2.39 branch.) This works as an inverse to the regular embedded dllexport directives, for cases when autoexport of all eligible symbols is performed. Differential Revision: https://reviews.llvm.org/D130120
- Loading branch information
Showing
7 changed files
with
49 additions
and
4 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
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,24 @@ | ||
// REQUIRES: x86 | ||
// RUN: llvm-mc -filetype=obj -triple=i686-win32-gnu %s -o %t.o | ||
|
||
// RUN: lld-link -lldmingw -dll -out:%t.dll %t.o -noentry | ||
// RUN: llvm-readobj --coff-exports %t.dll | FileCheck --implicit-check-not=Name: %s | ||
|
||
// CHECK: Name: | ||
// CHECK: Name: sym1 | ||
|
||
.global _sym1 | ||
_sym1: | ||
ret | ||
|
||
.global _sym2 | ||
_sym2: | ||
ret | ||
|
||
.global _sym3 | ||
_sym3: | ||
ret | ||
|
||
.section .drectve,"yn" | ||
.ascii " -exclude-symbols:sym2,unknownsym" | ||
.ascii " -exclude-symbols:unkonwnsym,sym3" |