[pocket-linux] Chapter 3. The dreaded libc.so.6

Miguel Servin El.Servas at gmail.com
Thu Oct 28 00:16:05 CDT 2004


I followed the directions for the chapter 2 (Build a statically-linked
bash) but using  compressed image in the rootdisk, from chapter 3.

As was predicted, the statically-linked bash (3.00) worked wonderfully
when loaded from the compressed image in the rootdisk.

The problem arises when I compile bash without the --enable-static-link option.

The output from 'ldd bash' when compiled using './configure
--enable-minimal-config' and then 'make' is:
  libdl.so.2 => /lib/libdl.so.2 (0x40026000)
  libc.so.6 => /lib/tls/libc.so.6 (0x42000000)
  /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

(note the reference to /lib/tls/libc.so.6, instead of the 'default'
/lib/libc.so.6)

So, in my [compressed] rootdisk I created the aditional directory
/lib/tls and added a symlink there, pointing to the file in /lib, but
still no go.
(/lib/tls/libc.so.6 -> /lib/libc.so.6)

The kernel boots, loads the compressed image into the ramdisk, tries
to execute /bin/sh and dies because the binary can't find libc.so.6 :(

Is there a way (maybe involving ld.so.conf and ldconfig, I don't
know...) to specify the compiler NOT to use the libraries in /lib/tls
when building bash, but just the ones in /lib?

Thank you.

On Wed, 27 Oct 2004 19:29:39 -0500, Miguel Angel Servin Velazquez
<miguel.servin.velazquez at banorte.com> wrote:
> Hi Eric. Thanks for your reply. :)
> 
> So you're telling me to compile bash with it's libraries linked statically and use it with the compressed image in the root disk, Right?
> 
> I will do it, but I almost can tell it's going to work well.
> 
> The problem I see is not the compressed image not loading well, but instead the dynamically-linked bash not finding the libraries it needs.
> BUT... I can be wrong, so I will try it tonight when I get home. :D
> 
> I'll keep you posted.
> _________
> El Servas
>



More information about the Pocket-Linux mailing list