Brian K. Smith <[EMAIL PROTECTED]> wrote:
> I tried the above and ran into a big problem. [...]
> When you move the start() function, the relocation
> code is using the wrong base address for the code section.

Amazing!  It just occurred to me five minutes ago that this could
be a problem with the technique.  I was hoping the linker might just
compensate for it, but I guess not.  :-(

> What is really needed is to get the linker to process
> libcrt.a before it processes my object code, so that is what I did.
[...]
>       gcc $(CFLAGS) -nodefaultlibs -lcrt  mycode1.o mycode2.o ...  -lgcc -lg

Good idea.  Did you try without the `-nodefaultlibs -lgcc -lg'?  Having
-lcrt appear twice shouldn't be a problem.

Alas, I suspect that if you start using global objects with non-trivial
ctors/dtors, you may run into a similar problem with .ctors and ctors_end
etc, which currently can't easily be moved from the end of the resource.

I think this all can be fixed, but I won't bore people here with it...

Thanks,

    John

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to