Hito everyone out there,
I just wish to know if someone has an idea on how the windows memory management system functions :is it a flat adress space memory management or segmented?
I alsowish to know if it is possible to load PE files in a flat memory model and how it can be done.
If someone has any suggestion on a better executable file format loadable using a flat memory model ,then i will be grateful.
Thanks.
Loading PE files
- einsteinjunior
- Member
- Posts: 90
- Joined: Tue Sep 11, 2007 6:42 am
Hi thanks,
The problem is that since they are talking about sections in the PE file format documentation from microsoft,i was sure that there was usee of segmentation.And also since windows can Run 16 bit applications ,i though its the case since they say in Intel manuals that paging should be enabled for you to use 16 bit code.
I will try ELF.Thanks.
The problem is that since they are talking about sections in the PE file format documentation from microsoft,i was sure that there was usee of segmentation.And also since windows can Run 16 bit applications ,i though its the case since they say in Intel manuals that paging should be enabled for you to use 16 bit code.
I will try ELF.Thanks.
What you may be mistaking for segmentation in the PE format is the section size alignment, which is nothing more than the capability to take a specific section, reduce its required executable size to only the size of its content, and then upon execution have the Windows loader align the sections size to a specific alignment and the execute the process.
Some good resources on a PE loader can be found in the ReactOS sources, the article "Mysteries of the Windows 2000 Loader" on the Microsoft website, and of course, the PE specifications on the Microsoft website. Google.
Some good resources on a PE loader can be found in the ReactOS sources, the article "Mysteries of the Windows 2000 Loader" on the Microsoft website, and of course, the PE specifications on the Microsoft website. Google.
-
- Member
- Posts: 2566
- Joined: Sun Jan 14, 2007 9:15 pm
- Libera.chat IRC: miselin
- Location: Sydney, Australia (I come from a land down under!)
- Contact:
The section alignment also helps keep the final binary page-aligned, which makes loading it into memory (and mapping it) much easier.Jeffrey wrote:What you may be mistaking for segmentation in the PE format is the section size alignment, which is nothing more than the capability to take a specific section, reduce its required executable size to only the size of its content, and then upon execution have the Windows loader align the sections size to a specific alignment and the execute the process.