[lld] r220259 - [PECOFF] Look for decorated entry symbol name.

Rui Ueyama ruiu at google.com
Mon Oct 20 20:53:43 PDT 2014


No, these are stdcall functions. Please take a look at "Name-decoration
convention" on http://msdn.microsoft.com/en-us/library/zxk0tw93.aspx.

On Mon, Oct 20, 2014 at 8:21 PM, Shankar Easwaran <shankare at codeaurora.org>
wrote:

> Are these versioned symbols ?
>
>
> On 10/20/2014 9:28 PM, Rui Ueyama wrote:
>
>> Author: ruiu
>> Date: Mon Oct 20 21:28:28 2014
>> New Revision: 220259
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=220259&view=rev
>> Log:
>> [PECOFF] Look for decorated entry symbol name.
>>
>> Entry symbol name can be decorated. When we look for _WinMain, we
>> also have to look for _WinMain at 16.
>>
>> Modified:
>>      lld/trunk/lib/ReaderWriter/PECOFF/LinkerGeneratedSymbolFile.h
>>      lld/trunk/test/pecoff/entry.test
>>
>> Modified: lld/trunk/lib/ReaderWriter/PECOFF/LinkerGeneratedSymbolFile.h
>> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/
>> ReaderWriter/PECOFF/LinkerGeneratedSymbolFile.h?rev=220259&r1=220258&r2=
>> 220259&view=diff
>> ============================================================
>> ==================
>> --- lld/trunk/lib/ReaderWriter/PECOFF/LinkerGeneratedSymbolFile.h
>> (original)
>> +++ lld/trunk/lib/ReaderWriter/PECOFF/LinkerGeneratedSymbolFile.h Mon
>> Oct 20 21:28:28 2014
>> @@ -337,7 +337,11 @@ private:
>>         // Returns true if a given name exists in an input object file.
>>       auto defined = [&](StringRef name) -> bool {
>> -      return _syms->defined().count(_ctx->decorateSymbol(name));
>> +      StringRef sym = _ctx->decorateSymbol(name);
>> +      if (_syms->defined().count(sym))
>> +        return true;
>> +      std::string ignore;
>> +      return findDecoratedSymbol(_ctx, _syms.get(), sym, ignore);
>>       };
>>         switch (_ctx->getSubsystem()) {
>>
>> Modified: lld/trunk/test/pecoff/entry.test
>> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/pecoff/
>> entry.test?rev=220259&r1=220258&r2=220259&view=diff
>> ============================================================
>> ==================
>> --- lld/trunk/test/pecoff/entry.test (original)
>> +++ lld/trunk/test/pecoff/entry.test Mon Oct 20 21:28:28 2014
>> @@ -17,6 +17,9 @@ WMAIN: _wmainCRTStartup
>>   # RUN: not lld -flavor link /out:%t.exe /alternatename:_WinMain=_foo \
>>   # RUN:   -- %t.obj 2> %t.log
>>   # RUN: FileCheck -check-prefix=WINMAIN %s < %t.log
>> +# RUN: not lld -flavor link /out:%t.exe /alternatename:_WinMain at 16=_foo
>> \
>> +# RUN:   -- %t.obj 2> %t.log
>> +# RUN: FileCheck -check-prefix=WINMAIN %s < %t.log
>>     WINMAIN: _WinMainCRTStartup
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>>
>>
>
> --
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted
> by the Linux Foundation
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141020/bf9f05a0/attachment.html>


More information about the llvm-commits mailing list