[lld] r220259 - [PECOFF] Look for decorated entry symbol name.
Shankar Easwaran
shankare at codeaurora.org
Mon Oct 20 20:21:16 PDT 2014
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
More information about the llvm-commits
mailing list