It seems that the DLL export directives for __cdecl and __stdcall
functions are not correctly written in asm output.
For example, when declaring a function like this:
__declspec(dllexport) int __cdecl exportFunc1(int c);
ASM output is:
.def _exportFunc1;
.scl 2;
.type 32;
.endef
.text
.globl _exportFunc1
.align 16, 0x90
_exportFunc1:
movl 4(%esp), %eax
ret
.section .drectve,"r"
.ascii " -export:_exportFunc1"
GNU assembler fails with the message that it can't find the symbol
_exportFunc1. When removing the leading underscores
("-export:exportFunc1") GAS is happy. This is also how GCC for mingw
behaves.
I can write a small patch for this but I just wanted to know if I am on
the right path ...
Anton Korobeynikov
2012-Feb-07 12:25 UTC
[LLVMdev] x86 asm dllexport output for mingw targets
Alen,> It seems that the DLL export directives for __cdecl and __stdcall > functions are not correctly written in asm output.So, this is for all functions then, right? :) -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University
On 7.2.2012 13:25, Anton Korobeynikov wrote:> Alen, > >> It seems that the DLL export directives for __cdecl and __stdcall >> functions are not correctly written in asm output. > So, this is for all functions then, right? :) >Well, __fastcall is working. That's because such functions have no preceding underscore but a '@'. @exportFunc1 at 4 Just a note to my previous mail: Actually, it's GNU ld which reports this error and not GAS. regards, Alen
Apparently Analagous Threads
- [LLVMdev] x86 asm dllexport output for mingw targets
- [Bug 49815] New: nouveau segfaults in p_atomic_dec_zero
- [Bug 48890] New: dmesg full of DATA_ERROR SEMANTIC_PTSZ_OVER_LIMIT errors on nouveau driver
- LLVM fails to install with ocaml enabled
- LLVM fails to install with ocaml enabled