Hi all! I've been writing on a small program for a while now but the size of my exe has not changed. Even though I have added several lines of code, the file has been exactly 3 kb all the time! When I opened the exe file in a hex-editor I found a lot of zeros which were just occupying space! Why is it so?
Posted on 2001-04-24 15:55:00 by blah
sections in the PE exe file are aligned to 0x200 hex 512 decimal so until you make enough additions to go beyond that current 512 multiple...the exe stays the same Further more the files are stored on HDD in clusters each clusetr is again (ussually) a multiple of 512 (magic number eh :).... nope is just the most used floppy sector size that was then used on HDD...that was ... you know legacy... ) and they (cluster sizes) are 4K, 8K, 16K, or 32K, so you see .... even if your exe looks like haveing 3k its takeing at least 4k of space on HDD if not much more (unless you have a real small HDD :) and a cluster size of 1k or 2k)
Posted on 2001-04-24 16:35:00 by BogdanOntanu
I watched an interesting effect under Win2K - if I link my dll without a .data or .rsrc section, Win2K doesnt load the dll during LoadLibrary. If I use a dummy .data and a resource section it works fine. Is this a feature or did I made a mistake? Can the effect also occure with exe files?
Posted on 2001-04-25 12:06:00 by beaster
the nt/2k loader has many weird things like the one u mentioned..eg,it wont load the exe if it doesnt import at least one api (god knows why?) or if u code an pe-encryptor and try delete the peheader (as a lame anti-dumping counteraction) the ntloader fucks up:/ and there are many,many ..hum..let's say not very wise things in the ntloader
Posted on 2001-04-26 13:43:00 by Shaolinwu