|
From: | Sam address@hidden |
Subject: | Re: Should mem sections have overlapping addresses? |
Date: | Fri, 21 Mar 2014 15:36:03 +1100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 |
Hi Alan,Correspondence on Cygwin mailing list and further testing reveals loading differs on windows/i386 platform. i.e windows maps the entire file into memory even the NOLOAD sections hence the issue still remains.
My original problem relates to a Cygwin dumper which traverses all section of an application plus it's DLLs. What I've found is that around half of the loaded DLLs have wrong VMAs returned for their .text sections. As it uses binutils to ascertain these memory locations I'm looking for some pointers on how to solve this.
Any further insights or suggestions would be greatly appreciated. Thanks, Sam On 18/03/14 09:54, Sam Liapis AT constrainttec dot com wrote:
I very much appreciate your response Alan. This is very helpful and explains why Cygwin dumper gets in a bind as it assumes all CODE & DEBUGGING flagged sections are in memory. Thanks again, Sam On 16/03/14 20:40, Alan Modra wrote:On Fri, Mar 14, 2014 at 11:15:38AM +1100, Sam Liapis at constrainttec dot com wrote:$ objdump -h airdac_.exe airpac_.exe: file format pei-i386 Sections: Idx Name Size VMA LMA File off Algn 0 .text 008d8980 00401000 00401000 00000400 2**4 CONTENTS, ALLOC, LOAD, READONLY, CODE, DATA ...7 .debug_info 151e2063 028ca000 028ca000 024b3000 2**0 <== VMA and SIZE match-up with trace aboveCONTENTS, READONLY, DEBUGGINGAs you can see from the flags above, .debug_info is not ALLOC, LOAD. This means the section is not loaded into memory and the VMA is irrelevant. Another DLL could well occupy this space, because airpac_.exe does not use that memory.
[Prev in Thread] | Current Thread | [Next in Thread] |