I have MinGW and Nasm linkage problems : when I have 2 files ( 1 - C, 2 - ASM ), and they have cross-references ld links it wrong.
Code: Select all
/* eg1.C */
extern void foo2();
void foo1()
{
/* some code here */
}
int main()
{
foo2();
return 0;
}
Code: Select all
; eg2.ASM
section .text
extern _foo1
global _foo2
_foo2:
call _foo1
; some code here
retn
P.S.
MinGW/GCC 3.4.2, NASM 0.98.39
object format COFF.
Actual sources is too big to place it here.
Thanks.