This is an archive of the discontinued LLVM Phabricator instance.

[LLD] [COFF] Fix mingw comdat associativity for leader symbols with a different name
ClosedPublic

Authored by mstorsjo on Jul 26 2020, 2:37 PM.

Details

Summary

For a weak symbol func in a comdat, the actual leader symbol ends up named like .weak.func.default*. Likewise, for stdcall on i386, the symbol may be named _func@4, while the section suffix only is "func", which the previous implementation didn't handle.

This fixes unwinding through weak functions when using -ffunction-sections in mingw environments.

Diff Detail

Event Timeline

mstorsjo created this revision.Jul 26 2020, 2:37 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 26 2020, 2:37 PM
hans accepted this revision.Jul 27 2020, 4:00 AM
This revision is now accepted and ready to land.Jul 27 2020, 4:00 AM
This revision was automatically updated to reflect the committed changes.
hans added a comment.Jul 27 2020, 7:48 AM

Pushed to 11.x as 9dea95b78082a1d9739a60be8a40d721788e4447
Please shout if any problems come up.