glibc vezus libc5

Stanislav Meduna stano na trillian.eunet.sk
Pondělí Duben 12 20:24:23 CEST 1999


On 12 Apr 1999 11:07:57 +0200, Pavel Kankovsky wrote:

:> Predpokladam, ze existuje sposob, ako prinutit Linux
:> pouzivat staru kniznicu aj stary dynamicky loader
:> pre neposlusne aplikacie. Existuje nejaky hotovy
:> wrapper pre JDK, StarOffice a.p.?

: S tim dynamic loaderem to bude docela potiz, jestli se v glibc 2.1
: jmenuje taky /lib/ld-linux.so.2. To snad jedine patchnout binarku nebo
: jiz bezet chrootnutou.

Spustit binarku s inym ld-linux.so ide bez problemov
(tak nejako bezali aj self-testy novej glibc); problem
zrejme nastane, ked zacne nieco exec-ovat vo vlastnej
rezii.

=== cut ===
% /lib/ld-linux.so.2
Usage: ld.so [--list|--verify] EXECUTABLE-FILE [ARGS-FOR-PROGRAM...]
You have invoked `ld.so', the helper program for shared library executables.
This program usually lives in the file `/lib/ld.so', and special directives
in executable files using ELF shared libraries tell the system's program
loader to load the helper program from this file.  This helper program loads
the shared libraries needed by the program executable, prepares the program
to run, and runs it.  You may invoke this helper program directly from the
command line to load and run an ELF executable file; this is like executing
that file itself, but always uses this helper program from the file you
specified, instead of the helper program file specified in the executable
file you run.  This is mostly of use for maintainers to test new versions
of this helper program; chances are you did not intend to run this program.

% /lib/ld-linux.so.2 --list /bin/ls
        libc.so.6 => /lib/libc.so.6 (0x40005000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x2aaaa000)

% cp /lib/ld-linux.so.2 xxx

% ./xxx --list /bin/ls
        libc.so.6 => /lib/libc.so.6 (0x40005000)
        /lib/ld-linux.so.2 => ./xxx (0x2aaaa000)

=== cut ===

Zrejme by malo stacit urobit wrappery pre vsetky
binarky, ktore su priamo alebo nepriamo spustane,
ktore neurobia nic ine ako exec povodnej aplikacie
s tymto ld-linuxom a spravnou LD_LIBRARY_PATH.
Ci tam ale nie je nejaky hacik (odhliadnuc od
programov parsujucich vystup ps a.p. :-)), netusim.


Zdravi
-- 
				Stano



Další informace o konferenci Linux