[lld] r218696 - [PECOFF] Allow /export:<symbol>,PRTVATE.
Rui Ueyama
ruiu at google.com
Tue Sep 30 13:09:31 PDT 2014
Author: ruiu
Date: Tue Sep 30 15:09:31 2014
New Revision: 218696
URL: http://llvm.org/viewvc/llvm-project?rev=218696&view=rev
Log:
[PECOFF] Allow /export:<symbol>,PRTVATE.
PRIVATE option is also an undocumented feature.
Modified:
lld/trunk/lib/Driver/WinLinkDriver.cpp
lld/trunk/test/pecoff/export.test
Modified: lld/trunk/lib/Driver/WinLinkDriver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/WinLinkDriver.cpp?rev=218696&r1=218695&r2=218696&view=diff
==============================================================================
--- lld/trunk/lib/Driver/WinLinkDriver.cpp (original)
+++ lld/trunk/lib/Driver/WinLinkDriver.cpp Tue Sep 30 15:09:31 2014
@@ -361,10 +361,10 @@ static bool parseManifestUAC(StringRef o
}
}
-// Parse /export:entryname[=internalname][, at ordinal[,NONAME]][,DATA].
+// Parse /export:entryname[=internalname][, at ordinal[,NONAME]][,DATA][,PRIVATE].
//
-// MSDN doesn't say anything about /export:foo=bar style option,
-// but link.exe actually accepts it.
+// MSDN doesn't say anything about /export:foo=bar style option or PRIVATE
+// attribtute, but link.exe actually accepts them.
static bool parseExport(StringRef option,
PECOFFLinkingContext::ExportDesc &ret) {
StringRef name;
@@ -396,6 +396,10 @@ static bool parseExport(StringRef option
ret.isData = true;
continue;
}
+ if (arg.equals_lower("private")) {
+ ret.isPrivate = true;
+ continue;
+ }
if (arg.startswith("@")) {
int ordinal;
if (arg.substr(1).getAsInteger(0, ordinal))
Modified: lld/trunk/test/pecoff/export.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/pecoff/export.test?rev=218696&r1=218695&r2=218696&view=diff
==============================================================================
--- lld/trunk/test/pecoff/export.test (original)
+++ lld/trunk/test/pecoff/export.test Tue Sep 30 15:09:31 2014
@@ -73,7 +73,7 @@ DUP-NOT: 1 0x2010 exportfn8
# RUN: yaml2obj %p/Inputs/export.obj.yaml > %t.obj
#
# RUN: lld -flavor link /out:%t1.dll /dll /entry:init \
-# RUN: /export:f1=exportfn1 /export:f2=exportfn2 -- %t.obj
+# RUN: /export:f1=exportfn1 /export:f2=exportfn2,private -- %t.obj
# RUN: llvm-objdump -p %t1.dll | FileCheck -check-prefix=EQUAL %s
EQUAL: Export Table:
More information about the llvm-commits
mailing list