Files
clang-p2996/lld/test/pecoff/exportlib2.test
Rui Ueyama be68a99f20 [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
2014-12-05 21:52:02 +00:00

22 lines
686 B
Plaintext

# RUN: yaml2obj %p/Inputs/export.obj.yaml > %t.obj
#
# RUN: lld -flavor link /out:%t.dll /dll /entry:init \
# RUN: /export:exportfn1 /export:exportfn2 /lldmoduledeffile:%t1.def -- %t.obj
# RUN: FileCheck -check-prefix=CHECK1 %s < %t1.def
CHECK1: LIBRARY "exportlib2.test.tmp.dll"
CHECK1: EXPORTS
CHECK1: exportfn1 @1
CHECK1: exportfn2 @2
CHECK1: exportfn3@256 @3
# RUN: lld -flavor link /out:%t.dll /dll /entry:init \
# RUN: /def:%p/Inputs/exports2.def /lldmoduledeffile:%t2.def -- %t.obj
# RUN: FileCheck -check-prefix=CHECK2 %s < %t2.def
CHECK2: LIBRARY "exportlib2.test.tmp.dll"
CHECK2: EXPORTS
CHECK2: exportfn1 @5
CHECK2: exportfn3@256 @6
CHECK2: exportfn7@8 @7