Frage

When I assemble a file using GCC tools (from MinGW package), calls to WINAPI functions from system DLLs have this form:

        call label
        ...
        ret
label:  jmp dword [ExitProcess]

Instead of:

        call dword [ExitProcess]
        ...
        ret

How can I force GCC to call directly idata section pointers instead of generating that extra code?

War es hilfreich?

Lösung

Simple solution:

If you want (this will throw a segment fault)

call *_MessageBoxA@16

do this instead

call *__imp__MessageBoxA@16

and you will get an indirect call without extra useless code.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top