On Thu, 2009-12-31 at 16:11 +0000, Pedro Alves wrote: > And, I'm using ld's --defsym switch to define it.
> It looks like Windows Mobile 6.1's loader is darn strict WRT > to base relocations, and we'll have to figure out a different > way to get at the runtime image base. A variation of what both you and I have tried should do the trick, shouldn't it ? Based on the values in your example : - we can't pass __image_base__ = 0x010000 - but we can pass 0x011000 == &DllMainCRTStartup then all the additional info we need is 0x01000 (BaseOfCode). After subtracting one from the other, we should be done. Getting the additional info into the DLL should be possible from the linker script : pavilion: {149} svn diff pe.sc Index: pe.sc =================================================================== --- pe.sc (revision 1418) +++ pe.sc (working copy) @@ -71,6 +71,7 @@ .text ${RELOCATING+ __image_base__ + ( __section_alignment__ < ${TARGET_PAGE_SIZE} ? . : __section_alignment__ )} : { ${RELOCATING+ *(.init)} + ${RELOCATING+__cegcc_text_start__ = . - __image_base__;} *(.text) ${R_TEXT} ${RELOCATING+ *(.text.*)} pavilion: {150} Trouble -> this produces the right value, but it turns up in the relocations :-( Not sure how to fix this. 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