質問

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?

役に立ちましたか?

解決

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.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top