[PECOFF] Fix exported symbols in an import library.
authorRui Ueyama <ruiu@google.com>
Fri, 5 Dec 2014 21:52:02 +0000 (21:52 +0000)
committerRui Ueyama <ruiu@google.com>
Fri, 5 Dec 2014 21:52:02 +0000 (21:52 +0000)
commitbe68a99f20ea2e6fb38e46b3675d3615a789bdfd
tree7167f262cc0bee3d811533b275663a683227cb38
parentd8b766072beadac7f2e9498c2950277369a64712
[PECOFF] Fix exported symbols in an import library.

Looks like if you have symbol foo in a module-definition file
(.def file), and if the actual symbol name to match that export
description is _foo@x (where x is an integer), the exported
symbol name becomes this.

  - foo in the .dll file
  - foo@x in the .lib file

I have checked in a few fixes recently for exported symbol name mangling.
I haven't found a simple rule that governs all the mangling rules.
There may not ever exist. For now, this is a patch to improve .lib
file compatibility.

llvm-svn: 223524
lld/lib/ReaderWriter/PECOFF/WriterImportLibrary.cpp
lld/test/pecoff/Inputs/exports2.def [new file with mode: 0644]
lld/test/pecoff/exportlib2.test