In http://msdn.microsoft.com/en-us/magazine/ms809762.aspx I found this :
DWORD SizeOfImage
        This appears to be the total size of the portions of the image
        that the loader has to worry about. It is the size of the region
        starting at the image base up to the end of the last section.
        The end of the last section is rounded up to the nearest
        multiple of the section alignment. 

Could the generated headers be inconsistent ? Is there a way to get a
Microsoft utility (an equivalent of objdump or so) to inspect the
executable created by cegcc ? Or the other way around - inspection with
objdump of the difference between the headers created by Visual Studio
and cegcc.

        Danny

On Thu, 2008-08-14 at 15:41 +0200, Jérôme Decoodt wrote:
> Hello,
> 
> > I don't have a clue. Have you tried looking this up on MSDN ?
> 
> I've search for this in MSDN but I didn't find anything that corresponds
> to my problem.
> 
> > I'm a bit confused about what you write, though. Are you saying that
> > adding one NOP changes the SizeOfImage from 10000 to 11000 ? 
> 
> The idea is to have the DLL source compiling with SizeOfImage as near as
> possible from 0x10000.
> Then, when you add juste an instruction like "nop", gcc will need to
> enlarge the code section (.text IIRC) with SectionAlignment bytes more,
> resulting in a SizeOfImage of 0x11000 (by default, SectionAlignment is
> 0x1000).
> 
> Furthermore, a DLL compiled with Visual Studio 2005 doesn't suffer this
> problem, even if SizeOfImage > 0x10000 (but compiling an autotools
> project in Visual Studio is a real pain).
> 
> Regards,
-- 
Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Cegcc-devel mailing list
Cegcc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cegcc-devel

Reply via email to