|
Home > Archive > Unix Programming > December 2007 > custom glibc quesiton.
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
custom glibc quesiton.
|
|
|
| Hi,
I'm trying to build a custom version of glibc for my system. I'm
running debian (3.1), with glibc 2.3.2. So, I downloaded glibc 2.3.2
and linuxthreads, did a configure, make, make install to a custom
directory. The problem is, when I use the new glibc, it causes a
segfault:
dww4s@p4-2c-11 glibc-build $ LD_LIBRARY_PATH=/home/dww4s/toolchain/
glibc/lib /bin/bash
Segmentation fault
dww4s@p4-2c-11 glibc-build $ /bin/bash
dww4s@p4-2c-11 glibc-build $
I think it may have something to do with the library placement:
dww4s@p4-2c-11 glibc-build $ LD_LIBRARY_PATH=/home/dww4s/toolchain/
glibc/lib ldd /bin/bash
libncurses.so.5 => /lib/libncurses.so.5 (0xb7fa5000)
libdl.so.2 => /home/dww4s/toolchain/glibc/lib/libdl.so.2
(0xb7fa1000)
libc.so.6 => /home/dww4s/toolchain/glibc/lib/libc.so.6
(0xb7e72000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0xb7fea000)
dww4s@p4-2c-11 glibc-build $ ldd /bin/bash
libncurses.so.5 => /lib/libncurses.so.5 (0xb7fa5000)
libdl.so.2 => /lib/tls/libdl.so.2 (0xb7fa1000)
libc.so.6 => /lib/tls/libc.so.6 (0xb7e6c000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0xb7fea000)
dww4s@p4-2c-11 glibc-build $
it seems my custom glibc puts itself at 0xb7e72000, whereas the
default is at 0xb7e6c000. Does anyone know about the interaction
between the loader and libc?
| |
| Måns Rullgård 2007-12-28, 7:23 pm |
| Dan <thermostat@gmail.com> writes:
> Hi,
> I'm trying to build a custom version of glibc for my system. I'm
> running debian (3.1), with glibc 2.3.2. So, I downloaded glibc 2.3.2
> and linuxthreads, did a configure, make, make install to a custom
> directory. The problem is, when I use the new glibc, it causes a
> segfault:
>
> dww4s@p4-2c-11 glibc-build $ LD_LIBRARY_PATH=/home/dww4s/toolchain/
> glibc/lib /bin/bash
> Segmentation fault
You need to invoke the new dynamic linker for this to work. Try
something like this:
/path/to/new/ld-linux-so.2 /bin/bash
You might need to add more components to LD_LIBRARY_PATH to get the
newly built libm, libpthread, etc.
> it seems my custom glibc puts itself at 0xb7e72000, whereas the
> default is at 0xb7e6c000. Does anyone know about the interaction
> between the loader and libc?
It's intricate, and that's enough for me.
--
Måns Rullgård
mans@mansr.com
|
|
|
|
|