Hello,

On Wed, 8 Jun 2011 14:11:18 -0700
Khem Raj <[email protected]> wrote:

> On Tue, Jun 7, 2011 at 8:44 AM, Sergei Poselenov
> <[email protected]> wrote:
> >
> > Where the clone() function returns? In my case, it crashes on the
> > "ldr pc, [sp]", as far as I can see.
> >
> > Why not to use
> > mov r1, [sp]
> > blx r1
> >
> > ?
> >
> > This works.
> >
> >
> > Could someone clarify?
> >
> are those functionally equivalent ?

For my target - obviously not, original doesn't work, "blx" does.

> secondly blx does not exist on arch < ARMv5

Yes, I'm aware of this. Here is a code snippet with my fix:
...
#if defined(__USE_BX__)
        ldr     r1, [sp]
        blx     r1
#else   /* Old code - a bug? */
        mov     lr, pc
        ldr     pc, [sp]
#endif
...


I just wonder is the original code clone() proved to work on
not-THUMB1_ONLY uClibc configurations?

Regards,
Sergei
_______________________________________________
uClibc mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/uclibc

Reply via email to