[PATCH] D36548: [llvm-dlltool] Fix creating stdcall/fastcall import libraries for i386

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 10 18:13:42 PDT 2017

rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.

> However, when creating an import library from scratch without linking a DLL, the information about what suffixes to use must come from somewhere, so they need to be in the def file. I'm not sure if it's even possible to create a proper import library for stdcall functions from scratch from a def file with MS link.exe/lib.exe, without having corresponding object files. (If someone knows how to do that, please tell me.) So the extra dlltool behaviour is warranted IMO.

I guess in the original intended usage model of dlltool, the caller would supply the .o files destined for the final DLL, and we could look up the undecorated names and use the suffixes contained in the object file to fill in the decorated symbol name. However, it sounds like dlltool supports running with a standalone .def file, and in that case, we need some source of decorated symbol name.


More information about the llvm-commits mailing list