문제

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