On Tue, 03 Nov 2009 17:59:20 +0100, Danny Backx <danny.ba...@scarlet.be> wrote: > On Tue, 2009-11-03 at 14:10 +0100, Vincent R. wrote: >> I have been fired (the company I was working for doesn't have money >> anymore) so I have some time to answer you ;-) > > Auch. Sorry to see that. > >> Microsoft changed the way memory was managed on wince > 4.2 and now from >> what I read >> PE section needs to have Read attribute as much as possible. > > Do you mean READONLY ? (The flag with that name in the section list you > copied from objdump ?) >
Yes please read this : http://blogs.msdn.com/hopperx/archive/2008/09/19/writeable-code-sections-got-you-down-fear-no-more.aspx >> I already did this job one year ago but let's do it again here is the >> dump >> of a >> dll compiled with msvc2008 targetting PocketPC2003(ARMV4) and without >> debug data : > > I have been decoding a couple of these myself to figure out what is > wrong. In my example, IAT is indeed NULL, but there is a .idata section. > This looks like an error in our toolset. > >> Then about sections you can see that .idata and .bss are not READONLY >> that's why .bss should be put inside .data because it seems to be the >> only >> one section allowed to have WRITE characteristics. > > I'm not sure I get the argument here. > > Do we know whether this is a requirement, or do we only suspect this ? No just an assumption based on url given above. > In my opinion, the goal is to create valid PE executables, not to create > the same ones that the Microsoft tools create. > >> About 4) I don't find the corresponding field with objdump, I can only >> see >> it with PE Explorer. > > I've studied a hex dump that shows that the fields in the "optional > header" are all NULL starting just after the "base relocation > table" / .reloc pointer (meaning : .debug, architecture, global pointer, > TLS table, load config table, bound import, iat, delay import > descriptor, CLR runtime header are all NULL). See p. 15 in the PECOFF > documentation - > http://www.microsoft.com/whdc/system/platform/firmware/PECOFF.mspx . > > Is the field you're referring to one of those ? (They are listed in the > objdump output, I think. But maybe under unexpected names.) > >> Finally when I am talking about changing import policy, >> you should know when you are importing symbols from a DLL you can >> reference them either by their name(Import-By-Name)or by an index >> (Import-By-Ordinal). > [..] >> I have modified import policy to be as close as possible as binaries >> generated with msvc. > > I don't understand the reason for doing this. > Trying to compare cegcc and msvc binaries, it's easier to see issues but your are right this is not mandatory. >> You can find the sample code I am using here : www [DO_T] smartmobili >> [D.OT] com/Downloads/cegcc-bug-testDLL.zip >> It's commented and very simple. > > Yes, I've been using it to some extent. > > Would it be possible to add the files generated by MSVC to the zip ? I > don't have all the tools that you appear to have. (They wouldn't do me > much good on my Linux box either.) They are already in the zip, look inside bin folder, you will find one binary compiled with msvc2008 and the other one with mingw32ce. >> There is still a Windows Mobile device to win (and no Danny you cannot >> play because you already have lots of devices). > > Actually I don't. But it would be good if Kai/Dave/Pedro - or someone > else - would be triggered by your offer. Hum they seem to have some better things to do (and I understand them ;-) Danny I think kai sent you some patch he did some time ago when I first asked him to help me with cegcc. Maybe we could start from this, this is the only option I see. Could you please the patch you have because I lost them ? Thanks PS : I will remove everyone from our discussion so no need to use antispam ;-) ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Cegcc-devel mailing list Cegcc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cegcc-devel