[PATCH] D39170: [LLD] [COFF] Fix exporting of functions starting with underscores, etc

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 22 13:41:25 PDT 2017


mstorsjo created this revision.

This fixes exporting functions in the following cases:

- functions starting with an underscore in def files
- functions starting with an underscore, via dllexport attributes, for mingw
- fastcall and vectorcall functions when declared undecorated in def files
- vectorcall functions when declared decorated in def files
- stdcall functions when declared decorated in def files for mingw

This still exports the stdcall functions with the wrong name in the normal msvc/link.exe mode, if declared with decoration in the def file though (this is not a regression though). Exporting functions via def files including decoration is not something I believe is routinely done though, but is tested to try to match link.exe's behaviour as far as easily possible.


https://reviews.llvm.org/D39170

Files:
  COFF/Driver.cpp
  COFF/SymbolTable.cpp
  test/COFF/def-export-stdcall.s
  test/COFF/dllexport-mingw.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39170.119798.patch
Type: text/x-patch
Size: 6513 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171022/c9f8c8e2/attachment.bin>


More information about the llvm-commits mailing list