On Thu, 2009-12-31 at 15:14 +0100, Kai Tietz wrote:
> 2009/12/31 Danny Backx <danny.ba...@scarlet.be>:
> > On Thu, 2009-12-31 at 14:30 +0100, Kai Tietz wrote:
> >> Could you try for the __image_base__ symbol the following hack. Maybe
> >> it is related to an issue in doing base relocation here in instruction
> >> (which could point to some other issue in object relaxing).
> >>
> >> add the following:
> >> static volatile void *_ib_address = &__image_base__;
> >>
> >> and then later instead of '&__image_base__' use '_ib_address'.
> >
> > Don't know why, but this causes my test program to crash. (Get the WM
> > error handling screen.) Should I try to get the info from it ?
> >
> >        Danny
> > --
> > Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info
> >
> >
> 
> Hmm, well. Could be interesting. One issue before doing this. Is the
> The PE section marked as loaded and allocated?

Not sure which section you mean. Here is the relevant part of objdump :
Idx Name          Size      VMA       LMA       File off  Algn
  0 .text         0000006c  01001000  01001000  00000400  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  1 .data         00010004  01002000  01002000  00000600  2**2
                  CONTENTS, ALLOC, LOAD, DATA
  2 .rdata        00000054  01013000  01013000  00010800  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  3 .reloc        00000018  01014000  01014000  00010a00  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA

> Possibly you can show me your altered test code, too.

Sure :
  http://danny.backx.info/download/cegcc/lib7.c
  http://danny.backx.info/download/cegcc/lib7.s
  http://danny.backx.info/download/cegcc/lib7.objdump
  http://danny.backx.info/download/cegcc/lib7.dll

I just ran this code again, and I'm copying this from the "Error
Reporting" page :
  ProcID   FramePtr RetAddr
  B65F4E82 09BAFC64 7805103C

My ARM assembler knowledge is not too hot, here is that part of the
code :
0100102c <doit>:
 100102c:       e52db004        push    {fp}            ; (str fp, [sp,
#-4]!)
 1001030:       e28db000        add     fp, sp, #0
 1001034:       e24dd004        sub     sp, sp, #4
 1001038:       e59f3018        ldr     r3, [pc, #24]   ; 1001058 <doit
+0x2c>
 100103c:       e5933000        ldr     r3, [r3]
 1001040:       e50b3004        str     r3, [fp, #-4]
 1001044:       e51b3004        ldr     r3, [fp, #-4]
 1001048:       e1a00003        mov     r0, r3
 100104c:       e28bd000        add     sp, fp, #0
 1001050:       e8bd0800        pop     {fp}
 1001054:       e1a0f00e        mov     pc, lr
 1001058:       01012000        tsteq   r1, r0

Is it trying to dereference a pointer too far ?

Further in the error reporting screens, there's a limited memory dump
that happens to include the right area (copied from above, last line
changed into the version from the dump) :

 100104c:       e28bd000        add     sp, fp, #0
 1001050:       e8bd0800        pop     {fp}
 1001054:       e1a0f00e        mov     pc, lr
78051058:       01870000 

This is odd, I would have expected 0x78050000 in that field.

        Danny
-- 
Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info


------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Cegcc-devel mailing list
Cegcc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cegcc-devel

Reply via email to