Re: [Cegcc-devel] fix cegcc PE bug

2009-11-15 Thread Danny Backx
On Sat, 2009-11-14 at 09:24 +0100, Danny Backx wrote: > On Sun, 2009-11-01 at 17:17 +0100, Vincent R. wrote: > > 1) Put section .edata and .idata inside .rdata > > 2) Put .bss data inside .data instead of emitting a .bss section > > 3) Fix IAT because value is NULL > > 4) Fix Pointer To Symbol Tabl

Re: [Cegcc-devel] fix cegcc PE bug

2009-11-14 Thread Danny Backx
On Sun, 2009-11-01 at 17:17 +0100, Vincent R. wrote: > 1) Put section .edata and .idata inside .rdata > 2) Put .bss data inside .data instead of emitting a .bss section > 3) Fix IAT because value is NULL > 4) Fix Pointer To Symbol Table because value is NULL As I wrote earlier, #3 is changed but t

Re: [Cegcc-devel] fix cegcc PE bug

2009-11-09 Thread Danny Backx
On Sun, 2009-11-08 at 14:16 +0100, Danny Backx wrote: > Does anyone know of a way to debug these things ? Adding an echo > statement only resulted in a syntax error. I still want to know how to debug linker scripts ! But the attached patch (one of Kais patches but ported from pep.sc to pe.sc) cau

Re: [Cegcc-devel] fix cegcc PE bug

2009-11-08 Thread Danny Backx
On Sat, 2009-11-07 at 19:14 +0100, Danny Backx wrote: > But still the IAT remains NULL. I suspect that the code that Kai also > patched in ld/emultempl/pep.em and scripttempl/armcoff.sc and > scripttempl/pep.sc might be related. > > Can anyone tell me how to interpret the ld scripts ? I haven't th

Re: [Cegcc-devel] fix cegcc PE bug

2009-11-07 Thread Danny Backx
On Fri, 2009-11-06 at 20:08 +0100, Danny Backx wrote: > On Fri, 2009-11-06 at 19:50 +0100, Vincent R. wrote: > > >> I have also applied another patch that I think is supposed to fill IAT > > >> value and I have recompiled binutils but when I clean/recompile my > > sample > > >> application I canno

Re: [Cegcc-devel] fix cegcc PE bug

2009-11-06 Thread Vincent R.
On Fri, 06 Nov 2009 02:03:41 +, Dave Korn wrote: > Vincent R. wrote: > >>> So Dave, question coundn't we manually change .idata section >>> characteristics for instance instead of disabling auto-import ? >> >> >> Ok I just tried to modify .idata section characteristics by removing >> write

Re: [Cegcc-devel] fix cegcc PE bug

2009-11-05 Thread Dave Korn
Danny Backx wrote: > I would > have expected it to report that the symbol I want to look up isn't > present, because objdump says it has no symbols, but it does find it. "objdump -t" dumps only the COFF symbol table, that is .obj-file-style symbols, debug symbols, etc.; what you are looking at

Re: [Cegcc-devel] fix cegcc PE bug

2009-11-05 Thread Dave Korn
Vincent R. wrote: >> So Dave, question coundn't we manually change .idata section >> characteristics for instance instead of disabling auto-import ? > > > Ok I just tried to modify .idata section characteristics by removing write > attributes and of course now I don't even have an error messag

Re: [Cegcc-devel] fix cegcc PE bug

2009-11-05 Thread Danny Backx
On Thu, 2009-11-05 at 21:31 +0100, Danny Backx wrote: > I've tested with my testapi application (see tools/dll) . > > On a DLL created with cegcc, the LoadLibrary system call fails with > error ERROR_BAD_EXE_FORMAT (value 193). > > On a DLL created with MSVC by Vincent, LoadLibrary does succeed.

Re: [Cegcc-devel] fix cegcc PE bug

2009-11-05 Thread Danny Backx
I've tested with my testapi application (see tools/dll) . On a DLL created with cegcc, the LoadLibrary system call fails with error ERROR_BAD_EXE_FORMAT (value 193). On a DLL created with MSVC by Vincent, LoadLibrary does succeed. I would have expected it to report that the symbol I want to look

Re: [Cegcc-devel] fix cegcc PE bug

2009-11-04 Thread Danny Backx
On Tue, 2009-11-03 at 23:05 +0100, Vincent R. wrote: > On Tue, 03 Nov 2009 17:59:20 +0100, Danny Backx > wrote: > >> 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 us

Re: [Cegcc-devel] fix cegcc PE bug

2009-11-04 Thread Dave Korn
Vincent R. wrote: > On Tue, 03 Nov 2009 17:59:20 +0100, Danny Backx > 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. Welcome t

Re: [Cegcc-devel] fix cegcc PE bug

2009-11-03 Thread Vincent R.
On Tue, 03 Nov 2009 17:59:20 +0100, Danny Backx 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 memo

Re: [Cegcc-devel] fix cegcc PE bug

2009-11-03 Thread Danny Backx
On Tue, 2009-11-03 at 23:05 +0100, Vincent R. wrote: > 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 ? Forwarded

Re: [Cegcc-devel] fix cegcc PE bug

2009-11-03 Thread Danny Backx
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 secti

Re: [Cegcc-devel] fix cegcc PE bug

2009-11-02 Thread Danny Backx
On Sun, 2009-11-01 at 17:17 +0100, Vincent R. wrote: > Basically from what I understand it consists in doing the following > modifications : > > 1) Put section .edata and .idata inside .rdata > 2) Put .bss data inside .data instead of emitting a .bss section > 3) Fix IAT because value is NULL > 4)

Re: [Cegcc-devel] fix cegcc PE bug

2009-11-01 Thread Danny Backx
-devel@lists.sourceforge.net; Pedro Alves ; Kai Tietz ; Dave Korn Subject: [Cegcc-devel] fix cegcc PE bug Hi, Now that binutils have been updated to latest version and normally cegcc is using pseudo-reloc v2 maybe it's time to try to fix the most annoying bug ie binary generated with

[Cegcc-devel] fix cegcc PE bug

2009-11-01 Thread Vincent R.
Hi, Now that binutils have been updated to latest version and normally cegcc is using pseudo-reloc v2 maybe it's time to try to fix the most annoying bug ie binary generated with cegcc cannot be loaded on windows ce platforms without some tricks. What I can do to help is very limited but if some