-
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] Don't create hints-section if Hint/Name Table is empty
Fixes assert in addLinkerModuleCoffGroup() when using by-ordinal imports only. Patch by Stefan Schmidt. Differential revision: https://reviews.llvm.org/D68352 llvm-svn: 374140
- Loading branch information
Showing
3 changed files
with
23 additions
and
1 deletion.
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,3 @@ | ||
LIBRARY test.dll | ||
EXPORTS | ||
ByOrdinalFunction @ 1 NONAME |
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,18 @@ | ||
# REQUIRES: x86 | ||
# | ||
# RUN: llvm-dlltool -k -m i386 --input-def %p/Inputs/ordinal-only-implib.def --output-lib %t-implib.a | ||
# RUN: llvm-mc -triple=i386-pc-win32 %s -filetype=obj -o %t.obj | ||
# RUN: lld-link -out:%t.exe -entry:main -subsystem:console -safeseh:no -debug %t.obj %t-implib.a | ||
# RUN: llvm-objdump -private-headers %t.exe | FileCheck --match-full-lines %s | ||
|
||
.text | ||
.global _main | ||
_main: | ||
call _ByOrdinalFunction | ||
ret | ||
|
||
# CHECK: The Import Tables: | ||
# CHECK: DLL Name: test.dll | ||
# CHECK-NEXT: Hint/Ord Name | ||
# CHECK-NEXT: 1 | ||
# CHECK-EMPTY: |