Wiki Roadmap Timeline Tickets New Ticket Source Search Help / Guide About Trac Login

Ticket #111 (new defect)

Opened 2 months ago

Last modified 2 months ago

fix mangled name decoration issues on MinGW

Reported by: ChristianK Assigned to:
Priority: major Milestone:
Component: Version:
Keywords: mingw windows linking Cc:

Description

LLVM seems to do some name decoration on its own in Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp, X86ATTAsmPrinter::decorateName. This messes up linking on x86 MinGW. We need to find a way around it, preferably without touching that LLVM code.

Change History

11/15/08 13:33:53 changed by elrood

Actually LLVM's decorations follow the standard for stdcall, prepending with an underscore and suffixing with @<arguments' number of bytes>. For calling externals like Windows API functions this works, so there appears to be nothing fundamentally wrong with the way LLVM decorates. Just using X86_StdCall as default in LDC is causing problems, first a lot of gcc warnings about resolving function symbols to their counterpart with the corrected suffix, and then undefined reference errors about the symbols not being found. Both CallingConv::C and ::Fast work.

11/16/08 02:44:10 changed by ChristianK

Yes. The issue is that we want StdCall? behavior without the extra decoration to implement the D calling convention and mangling. I doubt there's a way to get this without modifying LLVM to include the D calling convention :/

Copyright © 2008, LDC Development Team.