flat assembler
Message board for the users of flat assembler.

Index > Main > [PE] Why does the executable's size rise in steps?

Author
Thread Post new topic Reply to topic
Ecoste



Joined: 26 Aug 2015
Posts: 5
Ecoste 29 Aug 2015, 12:04
For example I have a hello world executable that's 2KB in size. If I add another string to .data, it will still be 2KB. However, if I add a lot of data, only then will it move onto 2.5KB. Why does the size increase in steps rather than what it actually should be?
Post 29 Aug 2015, 12:04
View user's profile Send private message Reply with quote
shutdownall



Joined: 02 Apr 2010
Posts: 517
Location: Munich
shutdownall 29 Aug 2015, 13:04
Ecoste wrote:
For example I have a hello world executable that's 2KB in size. If I add another string to .data, it will still be 2KB. However, if I add a lot of data, only then will it move onto 2.5KB. Why does the size increase in steps rather than what it actually should be?


Maybe any alignments used which force to jump in codesize ? Wink
Post 29 Aug 2015, 13:04
View user's profile Send private message Send e-mail Reply with quote
PeExecutable



Joined: 26 Jun 2015
Posts: 181
PeExecutable 29 Aug 2015, 13:48
Corporate Secret! Only Tomasz is supposed to know.
Post 29 Aug 2015, 13:48
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20344
Location: In your JS exploiting you and your system
revolution 29 Aug 2015, 15:34
The on disc PE format aligns each section to 2^9 bytes. It is normal.
Post 29 Aug 2015, 15:34
View user's profile Send private message Visit poster's website Reply with quote
Ecoste



Joined: 26 Aug 2015
Posts: 5
Ecoste 29 Aug 2015, 19:28
Thank you for your answers guys!
Post 29 Aug 2015, 19:28
View user's profile Send private message Reply with quote
typedef



Joined: 25 Jul 2010
Posts: 2909
Location: 0x77760000
typedef 30 Aug 2015, 02:35
revolution wrote:
The on disc PE format aligns each section to 2^9 bytes. It is normal.

disk Wink
Post 30 Aug 2015, 02:35
View user's profile Send private message Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1903
DOS386 12 Sep 2015, 11:32
This is due to PE file format, no disc or disk. This had been already discussed, I just can't find the threads.
Post 12 Sep 2015, 11:32
View user's profile Send private message 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.