Windows API calls from assembly while minimizing program size
Posted
by takteek
on Stack Overflow
See other posts from Stack Overflow
or by takteek
Published on 2009-06-02T22:03:06Z
Indexed on
2010/03/20
20:41 UTC
Read the original article
Hit count: 294
I'm trying to write a program in assembly and make the resulting executable as small as possible. Some of what I'm doing requires windows API calls to functions such as WriteProcessMemory. I've had some success with calling these functions, but after compiling and linking, my program comes out in the range of 14-15 KB. (From a source of less than 1 KB) I was hoping for much, much less than that.
I'm very new to doing low level things like this so I don't really know what would need to be done to make the program smaller. I understand that the exe format itself takes up quite a bit of space. Can anything be done to minimize that?
I should mention that I'm using NASM and GCC but I can easily change if that would help.
© Stack Overflow or respective owner