New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 859463 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 24
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug

Blocked on:
issue 880827

Blocking:
issue 792131



Sign in to add a comment

lld doesn't demangle symbol names for undefined symbols

Project Member Reported by h...@chromium.org, Jul 2

Issue description

pbos originally reported this:

"When hitting linking errors for missing symbols they're just really hard to parse. As a result I don't really read the linker output but rather guess what's wrong.

Is it feasible to get unmangled symbol names for better error messages (in addition to existing mangled names)? In this case I've not yet implemented a method Painter::CreateSolidRoundRectPainterWithInsets but it's somewhat tricky to read if you don't speak mangled C++."


[15/15] LINK(DLL) chrome.dll chrome.dll.lib chrome.dll.pdb
FAILED: chrome.dll chrome.dll.lib chrome.dll.pdb
ninja -t msvc -e environment.x86 -- ../../third_party/llvm-build/Release+Asserts/bin/lld-link.exe /nologo /IMPLIB:./chrome.dll.lib /DLL /OUT:./chrome.dll /PDB:./chrome.dll.pdb @./chrome.dll.rsp
../../third_party/llvm-build/Release+Asserts/bin\lld-link.exe: error: undefined symbol: __imp_?CreateSolidRoundRectPainterWithInsets@Painter@views@@SA?AV?$unique_ptr@VPainter@views@@U?$default_delete@VPainter@views@@@std@@@std@@IMABVInsets@gfx@@@Z
>>> referenced by C:\src\chromium\src\chrome\browser\ui\views\profiles\avatar_toolbar_button.cc:119
>>>               ui_4.lib(avatar_toolbar_button.obj):(?UpdateTooltipText@AvatarToolbarButton@@QAEXXZ)




lld has the code to demangle symbol names (lld::toString(coff::Symbol&)), it's just not used very much. In particular it's not used for the undefined symbol errors. It would be a good improvement to hook that up.
 
zturner: Now that microsoftDemangle() is in excellent shape, do you want to hook it up to lld?
https://reviews.llvm.org/D52104 does some of this.
Blockedon: 880827
Owner: thakis@chromium.org
Status: Started (was: Available)
https://reviews.llvm.org/D52145 does the missing bit
Last bit landed in r342401; should work after the next clang roll.
Status: Fixed (was: Started)
Should now work; shout if things don't work as expected.

Sign in to add a comment