Thumb interworking fixes for ARM EABI code
Khem Raj
khem at mvista.com
Fri Feb 10 23:44:44 UTC 2006
you might need to include features.h to get __USE_BX__ in
libc/sysdeps/linux/arm/syscall-eabi.S
otherwise the patch looks ok.
Thanks
-Khem
Joseph S. Myers said the following on 02/10/2006 02:48 PM:
> This patch fixes some of the ARM EABI code to be interworking-safe, using
> bx where appropriate. (This code went in around the same time as the
> Thumb patches, hence not being fixed by those patches.)
>
> Index: libc/sysdeps/linux/arm/mmap64.S
> ===================================================================
> --- libc/sysdeps/linux/arm/mmap64.S (revision 13903)
> +++ libc/sysdeps/linux/arm/mmap64.S (working copy)
> @@ -52,7 +52,11 @@
> DO_CALL (mmap2)
> cmn r0, $4096
> ldmfd sp!, {r4, r5}
> +#if defined(__USE_BX__)
> + bxcc lr
> +#else
> movcc pc, lr
> +#endif
> b __syscall_error
> .Linval:
> mov r0, $-EINVAL
> Index: libc/sysdeps/linux/arm/__longjmp.S
> ===================================================================
> --- libc/sysdeps/linux/arm/__longjmp.S (revision 13903)
> +++ libc/sysdeps/linux/arm/__longjmp.S (working copy)
> @@ -61,7 +61,11 @@
> # endif
> #endif
>
> +#if defined(__USE_BX__)
> + bx lr
> +#else
> mov pc, lr
> +#endif
>
> .size __longjmp,.-__longjmp
> libc_hidden_def(__longjmp)
> Index: libc/sysdeps/linux/arm/syscall-eabi.S
> ===================================================================
> --- libc/sysdeps/linux/arm/syscall-eabi.S (revision 13903)
> +++ libc/sysdeps/linux/arm/syscall-eabi.S (working copy)
> @@ -37,7 +37,11 @@
> swi 0x0
> ldmfd sp!, {r4, r5, r6, r7}
> cmn r0, #4096
> +#if defined(__USE_BX__)
> + bxcc lr
> +#else
> movcc pc, lr
> +#endif
> b __syscall_error
>
> .size syscall,.-syscall
>
>
More information about the uClibc
mailing list