linker errors when compiling and linking with a new glibc

Mike Frysinger vapier@gentoo.org
Fri Mar 20 19:16:00 GMT 2009


On Friday 20 March 2009 13:55:03 Ryan Arnold wrote:
> On Fri, Mar 20, 2009 at 12:48 PM, Daniel De La Zerda wrote:
> > I don't think that debugging will help. When I run /bin/ls I get a
> > segmentation fault as well, but when I run /bin/cat I don't get the
> > segmentation fault and it works as expected. I think I can't just include
> > the original "/lib/libgcc_s.so.1" that is installed in my system into my
> > new glibc tree. I'm not an expert but I think I have to get one that is
> > built with my own glibc, but I dont know how. Does anybody know?
>
> The segmentation fault when running /bin/ls is a symptom of trying to
> use LD_LIBRARY_PATH when the path you specify doesn't have  a complete
> set of libraries.  Personally I rarely ever use LD_LIBRARY_PATH.  The
> loader can't find the libraries it needs.

not so sure ... if your old glibc is in /lib, then setting LD_LIBRARY_PATH to 
the new glibc is wrong -- the old loader will still be used (since /bin/ls set 
PT_INTERP to a hardcoded path).  you need to manually execute the new loader, 
tell the new loader where the new libs are, and then tell it the binary to 
execute.

but i've only been half following this discussion ... maybe i'm completely off 
base
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://sourceware.org/pipermail/libc-help/attachments/20090320/2ee26c60/attachment.sig>


More information about the Libc-help mailing list