Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows Executable file structure

I know that generally the object file has code, data, heap and stack sections.
But I want to know how this is arranged in windows executables and Linux executables.
I searched on internet and found some structure.
I understood .text is for code and .data is for global variables.
I want to know here is the stack and heap in both Linux and Windows platform?
Can anybody tell me the executable file structures??

Thanks in advance...

like image 934
Harikrishnan Avatar asked Sep 15 '26 11:09

Harikrishnan


1 Answers

This is the specification that Microsoft has released:

http://msdn.microsoft.com/en-us/windows/hardware/gg463119

Also this is a good reading on the subject: http://msdn.microsoft.com/en-us/magazine/cc301805.aspx

EDIT:

Stack/Heap are in-memory structures which are created/modified during run-time so in essence they are not in the file itself - they can't be. Think of them as a special place in memory where each and every program can store run-time data and by run-time data I mean variables. function invocations, return values and all the nitty-gritty stuff that are hapening on the low level.

like image 94
LordDoskias Avatar answered Sep 17 '26 04:09

LordDoskias



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!