forked from OSchip/llvm-project
[PECOFF] Allow /export:<symbol>,PRTVATE.
PRIVATE option is also an undocumented feature. llvm-svn: 218696
This commit is contained in:
parent
3837e10002
commit
fa67adc28d
|
@ -361,10 +361,10 @@ static bool parseManifestUAC(StringRef option,
|
|||
}
|
||||
}
|
||||
|
||||
// Parse /export:entryname[=internalname][,@ordinal[,NONAME]][,DATA].
|
||||
// Parse /export:entryname[=internalname][,@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))
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue