lhmouse <lh_mo...@126.com> schrieb am 19:00 Montag, 6.Februar 2017: > Compiling app.c with `-S -masm=intel` produces the following assembly > code, with directives removed: > > _main: > push ebp > mov ebp, esp > and esp, -16 > call ___main > mov eax, DWORD PTR __imp__dll_function > call eax > mov eax, 0 > leave > ret > > > The DLL loader function `__imp__dll_function` seems not generated by the > compiler. So it seems that dlltool for i686 isn't generating correct > machine code for delay-loaded functions.
With `objdump -D -z dll.a` I can see this: Disassembly of section .text: 00000000 <_dll_function>: 0: ff 25 00 00 00 00 jmp *0x0 6: b8 00 00 00 00 mov $0x0,%eax b: e9 00 00 00 00 jmp 10 <_dll_function+0x10> Disassembly of section .idata$5: 00000000 <__imp__dll_function>: 0: 06 push %es 1: 00 00 add %al,(%eax) 3: 00 .byte 0x0 So dlltool did generate `__imp__dll_function`, but the linker didn't pick it up. Regards Domani Hannes ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public