Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[LLD] [COFF] Fix def file exporting of symbols containing periods
This fixes an accidental breakage of exporting symbols using def files, when the symbol name contains a period, since commit 0ca06f7, mixing up a symbol name containing a period with the case of exporting a symbol as a forward to another dll. Differential Revision: https://reviews.llvm.org/D79619
- Loading branch information
Showing
2 changed files
with
31 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,29 @@ | ||
# REQUIRES: x86 | ||
|
||
# RUN: echo -e "EXPORTS\n foo.bar" > %t.def | ||
|
||
# RUN: llvm-mc -filetype=obj -triple=x86_64-windows-msvc -defsym drectve=0 %s -o %t.obj | ||
# RUN: lld-link -entry:dllmain -dll -def:%t.def %t.obj -out:%t.1.dll | ||
# RUN: llvm-readobj --coff-exports %t.1.dll | FileCheck %s | ||
|
||
# RUN: lld-link -entry:dllmain -dll %t.obj -out:%t.2.dll -export:foo.bar | ||
# RUN: llvm-readobj --coff-exports %t.2.dll | FileCheck %s | ||
|
||
# RUN: llvm-mc -filetype=obj -triple=x86_64-windows-msvc -defsym drectve=1 %s -o %t.drectve.obj | ||
# RUN: lld-link -entry:dllmain -dll %t.drectve.obj -out:%t.3.dll | ||
# RUN: llvm-readobj --coff-exports %t.3.dll | FileCheck %s | ||
|
||
# CHECK: Name: foo.bar | ||
|
||
.text | ||
.globl dllmain | ||
.globl foo.bar | ||
dllmain: | ||
ret | ||
foo.bar: | ||
ret | ||
|
||
.if drectve==1 | ||
.section .drectve | ||
.ascii "-export:foo.bar" | ||
.endif |