[PATCH] D84607: [LLD] [COFF] Fix mingw comdat associativity for leader symbols with a different name

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 26 14:38:01 PDT 2020


mstorsjo created this revision.
mstorsjo added reviewers: hans, smeenai, amccarth.
Herald added a project: LLVM.

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 at 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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D84607

Files:
  lld/COFF/InputFiles.cpp
  lld/test/COFF/associative-comdat-mingw-i386.s
  lld/test/COFF/associative-comdat-mingw-weak.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84607.280753.patch
Type: text/x-patch
Size: 4945 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200726/5cebff34/attachment.bin>


More information about the llvm-commits mailing list