GCC wastes thousands of bytes
Posted: Thu Feb 12, 2004 12:00 am
Hi,
I was trying to write a little kernel in C++ using gcc, nasm and ld.
Everything works fine and my kernel can even write to screen but any of this tools wastes much space by filling the binary with about 10 kb of zero-bytes.
(That is very much if the kernel is only about 17kb all in all)
It also puts lots of NOPs into the binary although I never said so.
What can I do to prevent gcc/ld from doing this?
Thx, George
I was trying to write a little kernel in C++ using gcc, nasm and ld.
Everything works fine and my kernel can even write to screen but any of this tools wastes much space by filling the binary with about 10 kb of zero-bytes.
(That is very much if the kernel is only about 17kb all in all)
It also puts lots of NOPs into the binary although I never said so.
What can I do to prevent gcc/ld from doing this?
Thx, George