forked from swiftlang/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[LLD] [COFF] Error out if creating a DLL with too many exported symbols
The PE/DLL format has a limit on 64k exported symbols per DLL; make sure to check this. Differential Revision: https://reviews.llvm.org/D86701
- Loading branch information
Showing
3 changed files
with
24 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,5 @@ | ||
import sys | ||
|
||
print("EXPORTS") | ||
for i in range(0, int(sys.argv[1])): | ||
print("f%d=f" % (i)) |
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 | ||
# RUN: %python %p/Inputs/def-many.py 65535 > %t-65535.def | ||
# RUN: %python %p/Inputs/def-many.py 65536 > %t-65536.def | ||
# RUN: llvm-mc -triple x86_64-win32 %s -filetype=obj -o %t.obj | ||
# RUN: lld-link -dll -noentry %t.obj -out:%t.dll -def:%t-65535.def | ||
# RUN: not lld-link -dll -noentry %t.obj -out:%t.dll -def:%t-65536.def 2>&1 | FileCheck %s | ||
|
||
# CHECK: error: too many exported symbols | ||
|
||
.text | ||
.globl f | ||
f: | ||
ret |