[uClibc] thumb toolchain
Dave Hylands
dhylands at broadcom.com
Wed Mar 3 23:52:32 UTC 2004
Hi David,
There were a couple of patches posted recently (around Feb 22-24, 2004)
on the linux-arm-kernel list
http://www.arm.uk.linux.org/armlinux/mailinglists.php
which had some kernel patches relating to running thumb code.
I think that the thread starts here:
http://lists.arm.linux.org.uk/pipermail/linux-arm-kernel/2004-February/0
19765.html
Make sure you read the entire thread.
--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/
> -----Original Message-----
> From: uclibc-bounces at uclibc.org
> [mailto:uclibc-bounces at uclibc.org] On Behalf Of David Muse
> Sent: Wednesday, March 03, 2004 3:46 PM
> To: uclibc at uclibc.org
> Subject: [uClibc] thumb toolchain
>
>
> Hello,
>
> I've been hacking for a few days, trying to put together a
> thumb-linux-uclibc toolchain. That is, a uclibc toolchain
> for linux where the tools generate thumb code and the
> libraries are thumb code.
>
> First, is anyone else working on this?
>
> Second, I've been having a little trouble... I'm running a
> montavista linux 2.4.18 kernel which alledges to have support
> for thumb system calls but I can't even get very simple
> assembly programs (that don't even make system calls) to run
> without segfaulting. I'm not terribly experienced with raw
> assembly, so I may be doing something dumb, but does anyone
> out there know of any thumb-related problems with that kernel
> or other kernels? Can anyone recommend a kernel where thumb
> code is known or believed to run?
>
> As far as hacking on the toolchain, here's what I've done so far:
>
> binutils:
> nothing, when compiled for an arm target, as can
> allegedly create thumb code when passed -mthumb
>
> gcc:
> in gcc/config/arm/t-linux:
> added a MULTILIBS definition for mthumb, to
> build mthumb versions of libgcc,crtbegin,crtend
> added a lib1asm functions that thumb code
> requires to the LIBASM1FUNCS
>
> uclibc:
> added new system call semantics for thumb: the system
> call number is passed in r7 instead of in the swi parameter
> add #if defined(__thumb__) in most places where #if
> defined(__arm__) is called
>
> gcc and uclibc:
> add #ifdef __thumb__'s and (presumed) equivalent
> thumb-specific code for wherever arm assembly code is used
>
>
> I've had moderate success getting everything to build so far.
> I still get some undefined symbols when trying to link
> libc.so and a few complaints about arm calls to thumb
> functions, but hopefully I'll be able to work through those
> issues soon.
>
> Am I on the right track? I'm I missing anything signifigant?
>
> Does anyone know of a good arm/thumb emulator/debugger that
> can run on x86 linux?
>
> Thanks,
>
> David Muse
> dmuse at 4accesscommunications.com
>
More information about the uClibc
mailing list