| Author |
using alternative glibc
|
|
| Andrei Voropaev 2004-07-28, 9:05 pm |
| Hi!
Sorry if this question is not for this group.
I have installed newer glibc version into alternative directory
/usr/local/glibc. Now I would like to run executable compiled against
that version. But when I try to start it I get errors like
/bin/sh: /lib/ld-linux.so.2: version `GLIBC_PRIVATE' not found (required
by /usr/local/glibc/lib/libdl.so.2)
I guess the problem is with that '/lib/ld-linux.so.2' this is loader for
my current version of glibc. The newer loader is at /usr/local/glibc/lib
directory. Is there any way that I can force that executable to use my
"alternative" glibc?
Thank you
Andrei
| |
| Igmar Palsenberg 2004-07-28, 9:05 pm |
| Andrei Voropaev wrote:
> I have installed newer glibc version into alternative directory
> /usr/local/glibc. Now I would like to run executable compiled against
> that version. But when I try to start it I get errors like
>
> /bin/sh: /lib/ld-linux.so.2: version `GLIBC_PRIVATE' not found (required
> by /usr/local/glibc/lib/libdl.so.2)
>
> I guess the problem is with that '/lib/ld-linux.so.2' this is loader for
> my current version of glibc. The newer loader is at /usr/local/glibc/lib
> directory. Is there any way that I can force that executable to use my
> "alternative" glibc?
The path to ld-linux.so.* is hard-coded at link-time. You need to hack
the gcc linker script to make it use the other linker.
The script itself is in /usr/lib/gcc-lib/<arch>/<version>/specs
You might as in a gcc group on how to hack it, I won't touch it :)
Igmar
| |
| Paul Pluzhnikov 2004-07-29, 3:56 am |
| Igmar Palsenberg <igmar@non-existant.local> writes:
> The path to ld-linux.so.* is hard-coded at link-time.
True.
> You need to hack
> the gcc linker script to make it use the other linker.
False. Simple command line option:
-Wl,-dynamic-linker=/usr/local/glibc/lib/ld-linux.so.2
is sufficient to override the default dynamic interpreter.
One could also run existing executables without relinking this way:
/usr/local/glibc/lib/ld-linux.so.2 --library-path /usr/local/glibc/lib ./a.out
Finally, take a look here:
http://www.bitwagon.com/rtldi/rtldi.html
Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
| |
| Andrei Voropaev 2004-07-29, 8:57 am |
| On 2004-07-29, Paul Pluzhnikov <ppluzhnikov-nsp@charter.net> wrote:
> Igmar Palsenberg <igmar@non-existant.local> writes:
>
>
> True.
>
>
> False. Simple command line option:
>
> -Wl,-dynamic-linker=/usr/local/glibc/lib/ld-linux.so.2
>
> is sufficient to override the default dynamic interpreter.
>
> One could also run existing executables without relinking this way:
>
> /usr/local/glibc/lib/ld-linux.so.2 --library-path /usr/local/glibc/lib ./a.out
>
> Finally, take a look here:
>
> http://www.bitwagon.com/rtldi/rtldi.html
Cool. This is what I need. Simple loading with my own ld-linux.so.2 does
not work, because that executable invokes some external programs that
are compiled against old library and this failes because they find new
library in the library-path. I'll try out rtldi
Andrei
|
|
|
|