uClibc ARM thumb support
Joakim Tjernlund
joakim.tjernlund at transmode.se
Sun Jan 22 12:21:40 UTC 2006
> -----Original Message-----
> From: uclibc-bounces at uclibc.org
> [mailto:uclibc-bounces at uclibc.org] On Behalf Of John Bowler
> Sent: den 21 januari 2006 08:02
> To: uclibc at uclibc.org
> Subject: uClibc ARM thumb support
>
> I updated bug 385 (http://bugs.busybox.net/view.php?id=385)
> with a new set of patches which apply to the SVN head (as of
> 20060120) and which apparently work.
>
> I say 'apparently' because when I tested them with both ARM
> and Thumb compilation shells apparently fail - either an
> abort of some kind or a hang. I can reproduce this both with
> and without the patches, so I assume it is either my build or
> the SVN head.
>
> Running /usr/bin/find as the init did, however, work and
> /sbin/init partially works (it either crashes itself or the
> shell it execs to run rcS crashes).
>
> The patch set still contains the controversial dl-hash.c
> change, which may be unnecessary because binutils 2.16 may
> strip out the problematic ARM_STT_TFUNC. Anyway, the patch
> set is be fine without the dl-hash.c change (i.e. nothing
> breaks, although thumb stuff might not work in some cases.)
> The very limited testing I could do without a shell shows
> /usr/bin/find working fine but /sbin/init gets a segmentation
> violation.
>
> John Bowler <jbowler at acm.org>
>
Hi John
Did a little research since our last chat. Found this:
. If the st_shndx member of the symbol table entry is not SHN_UNDEF, the dynamic linker
has found a definition for the symbol and uses its st_value member as the symbol's
address.
. If the st_shndx member is SHN_UNDEF and the symbol is of type STT_FUNC and the
st_value member is not zero, the dynamic linker recognizes this entry as special and uses
the st_value member as the symbol's address.
. Otherwise, the dynamic linker considers the symbol to be undefined within the executable file
and continues processing.
in http://refspecs.freestandards.org/elf/elfspec_ppc.pdf, heading Function Addresses
This shows that there are cases when SHN_UNDEF is a valid target.
Don't know much about ARM even less about Thumb but since STT_ARM_TFUNC is
encoded in st_value you might want to try adding to the current dl_hash in SVN:
if (sym->st_value == 1)
continue;
The dl_hash.c changes does not look sane to me, looks like you have restored the old WEAK
procedure(among some other stuff that I don't understand yet)? Why?
Jocke
More information about the uClibc
mailing list