flat assembler
Message board for the users of flat assembler.

Index > Windows > Why is codesection such big?

Author
Thread Post new topic Reply to topic
Cooglefish



Joined: 19 Feb 2008
Posts: 1
Cooglefish 19 Feb 2008, 12:53
Hello!

If I use just MessageBoxA in my code the codesection is very large, because many "DB 00" are added. Why? Is this because the sectionalignment? Is it possible to shrink?

Code:
00402000 PUSH 0                                   
00402002 PUSH 00401000
00402007 PUSH 0040100B 
0040200C PUSH 0 
0040200E  CALL DWORD PTR DS:[<&USER32.MessageBoxA>> 
00402014  RETN 
00402015  DB 00 
00402016  DB 00 
00402017  DB 00 
00402018  DB 00 
00402019  DB 00 
... 
... 
... 
00402FFC  DB 00 
00402FFD  DB 00 
00402FFE  DB 00 
00402FFF  DB 00 
    

(Disassembled with Ollydbg)


Thanks,
Cooglefish
Post 19 Feb 2008, 12:53
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20363
Location: In your JS exploiting you and your system
revolution 19 Feb 2008, 13:07
The OS allocates pages at a granularity of n*4k. It's a hardware design limitation.
Post 19 Feb 2008, 13:07
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.