![]() |
|
|
|
#1
|
|||
|
|||
|
Why isn't it a gap? I suppose we should define what a "gap" actually is first...
As the ntdll.dll example shows, when the virtual size of a section is considered rounded up to the section size (0x10000 in this case), then there really isn't any gap between the addresses. But since the PE loader actually rounds the virtual size up to the page size only (0x1000) when mapping the image, then there are unallocated/inaccessble blocks of memory between the sections (and it has nothing to do with the physical size, SizeOfRawData, it's all about virtual addresses and sizes). I would probably call it a gap, but yes, it's a bit special
|
|
#2
|
|||
|
|||
|
Quote:
|
|
#3
|
|||
|
|||
|
No, it doesn't - check the example given above in debugger or vmmap.
Note that we're talking about a case when section alignment, as specified in PE header, is actually bigger than one page. |
|
#4
|
|||
|
|||
|
I don't understand why they designed such a loose and bug-ridden format in the first place.
What's the point of having weird undocumented behaviour that dramatically affects compatibility and even worse, changes across OS versions. Give this a read, if you haven't seen it already: http://reversinglabs.com/advisory/pecoff.php If that doesn't make you curl up on the floor and weep like a 5 year-old, kudos to you good sir
|
![]() |
| Tags |
| header, loader, overflow, overlap, section |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 2 questions about hasp | suddenLy | General Discussion | 3 | 01-12-2005 01:51 |
| 2 questions (IDA / Windows 2k/2k3) | skyper | General Discussion | 8 | 04-22-2004 08:44 |
| questions about code | bartster | General Discussion | 19 | 02-14-2004 01:31 |
| some unpacking questions | gnasher | General Discussion | 2 | 01-03-2004 20:44 |