[uClibc]Problem with uClibc and shared libraries on ARM

Alex Holden alex at linuxhacker.org
Mon Jan 28 02:26:17 UTC 2002


I've been trying to build a working system with the buildroot-tux 
script. I eventually got the script to complete (hint: the part of the 
README which says that you don't need to be root to build it is wrong).

To get it to build uclibc/ldso/ldso I had to remove the "-z combreloc" 
part of the linker options as none of the toolchains I tried (about four 
or five different ones) recognised it.

After getting the build script to complete, the kernel worked first time 
but the filesystem image didn't work at all, silently dying as it tried 
to start init.

I managed to track the problem down to ld.so- building busybox, etc. as 
static produces a working filesystem, and using the newly built binaries 
with an older precompiled uClibc works too. Whenever I try to run 
anything which is dynamically built against a version of uClibc I've 
built myself though, it always instantly segfaults. Stracing it shows it 
segfaulting straight after calling exec:

execve("./busybox", ["./busybox"], [/* 19 vars */]) = 0
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++

I haven't managed to persuade gdb to give me any useful information 
about where it's going wrong. Even with debugging turned on, all I know 
is that it's segfaulting at "0x40000ee8 in ?? ()".

I've tried various different toolchains with the same results.

I've tried going back in time through the cvs history, backing out 
recent changes, and although the "combreloc" thing has only recently 
appeared, earlier versions also fail in exactly the same way when built. 
If I go back too far (like as far as the 0.9.8 release) the buildroot 
script refuses to build uClibc at all.

Any more suggestions?

-- 
------------ Alex Holden - http://www.linuxhacker.org ------------
If it doesn't work, you're not hitting it with a big enough hammer




More information about the uClibc mailing list