Andreas,
Very useful information to know. So it would appear that the long
and short of it is to use the GCC 3.4.4 toolchain for now if I want to
do XIP on my platform. I will give this a try as well and see what the
results are.
Regards,
JB
On Thu, May 21, 2009 at 5:50 PM, Andreas Fenkart
<[email protected]> wrote:
> On Wed, May 20, 2009 at 02:15:57PM -0400, Jeff Bacon wrote:
>> Thanks! I will try this out and see if it helps. Just curious if you had any
>> thoughts on the rest of my message (any places I should look to for
>> troubleshooting)?
>> Cheers,
>>
>> JB
>>
>
> Try with this toolchain:
> arm-linux-tools-20061213.tar.gz
>
> You also might want to have a look at this:
> http://www.mailinglistarchive.com/[email protected]/msg04571.html
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28194
>
> I actually run into the same problem and after quite some
> debugging I found one of the problems to be in
> uClibc/libc/stdlib/_atexit.c.
>
> /*
> * Normal program termination
> */
> void exit(int rv)
> {
> /* Perform exit-specific cleanup (atexit and on_exit) */
> __UCLIBC_MUTEX_LOCK(__atexit_lock);
> if (__exit_cleanup) {
> __exit_cleanup(rv);
> }
> __UCLIBC_MUTEX_UNLOCK(__atexit_lock);
>
> __uClibc_fini();
>
> /* If we are using stdio, try to shut it down. At the very least,
> * this will attempt to commit all buffered writes. It may also
> * unbuffer all writable files, or close them outright.
> * Check the stdio routines for details. */
> if (_stdio_term)
> _stdio_term();
>
> _exit(rv);
> }
>
> The relevant output from objdump -S user/filetuils/cat.gdb looks
> like this
>
> 00000c6c <__GI_exit>:
> <snip>
> cd8: e59f3028 ldr r3, [pc, #40] ; d08 <__GI_exit+0x9c>
> cdc: e09a3003 adds r3, sl, r3
> ce0: 11a0e00f movne lr, pc
> ce4: 11a0f003 movne pc, r3
> ce8: e1a00005 mov r0, r5
> cec: ebffff09 bl 544 <__GI_abort+0xe8>
> cf0: 00000048 andeq r0, r0, r8, asr #32
> cf4: 00000024 andeq r0, r0, r4, lsr #32
> cf8: 0000002c andeq r0, r0, ip, lsr #32
> cfc: 0000000c andeq r0, r0, ip
> d00: 00001c9c muleq r0, ip, ip
> d04: 00000014 andeq r0, r0, r4, lsl r0
> d08: ffffebe0 undefined instruction 0xffffebe0
>
>
> Important to know, that the sl register points to the global
> offset table
>
> 00001420 0 OBJECT LOCAL HIDDEN 3 _GLOBAL_OFFSET_TABLE_
>
> So 0x00001420 + 0xffffebe0 is zero, actually saying that
> _stdio_term is undefined.
> When the code is loaded it gets relocated, and the sl register
> contains a value other than 0x1420. Hence it jumps wherever
> something + 0xffffebe0 points to.
>
> Kind regards
>
> Andreas Fenkart
>
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev