From: Alexey Tourbin <at@altlinux.ru>
To: ALT Devel discussion list <devel@altlinux.ru>
Subject: [devel] Re: Как заставить прогу тайти билиотеку?
Date: Tue, 9 Mar 2004 19:49:56 +0300
Message-ID: <20040309164956.GN4270@solemn.turbinal.org> (raw)
In-Reply-To: <404DE855.1000000@l14.ru>
[-- Attachment #1: Type: text/plain, Size: 1050 bytes --]
On Tue, Mar 09, 2004 at 06:52:53PM +0300, Алексей Любимов wrote:
> Да это как раз понятно. Под чрутом все прозрачно получается, но больно
> много тащить приходиться...
> Ктож знал, что файл ld-2.3.2.so в переменной LD_LIBRARY_PATH может
> каталогом прикидываться?
Вы ничего не поняли. :(
Файл ld-2.3.2.so не в переменной LD_LIBRARY_PATH (и уж тем более не
прикидывается каталогом), файл ld-2.3.2.so -- это сам executable.
В качестве параметра он берет динамический бинарь и его аргументы.
$ /lib/ld-linux.so.2 /bin/date
Tue Mar 9 19:40:40 MSK 2004
$
Это стандартный способ запуска динамических бинарей (с помощью
динамического линкера). Просто в нормальной ситуации /lib/ld-linux.so.2
прозрачно подгружается ядром (execve), и ему передается управление.
А откуда ядро знает, какой линкер подгружать? А из самого бинаря:
$ strings /bin/date | head -1
/lib/ld-linux.so.2
$
Поэтому его и нельзя подменить с помощью LD_LIBRARY_PATH: эта переменная
влияет на сам линкер, который должен быть к тому моменту уже загружен.
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2004-03-09 16:49 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-09 10:39 [devel] " Igor Tertishny
2004-03-09 10:50 ` [devel] " Alexey Tourbin
2004-03-09 14:29 ` Алексей Любимов
2004-03-09 14:40 ` Alexander Bokovoy
2004-03-09 14:52 ` Алексей Любимов
2004-03-09 15:40 ` Dmitry V. Levin
2004-03-09 15:52 ` Алексей Любимов
2004-03-09 16:05 ` Alexander Bokovoy
2004-03-09 16:49 ` Alexey Tourbin [this message]
2004-03-09 17:37 ` Alexey Lubimov
2004-03-20 8:57 ` Klimchev Konstantin
2004-03-09 14:41 ` Alexey Tourbin
2004-03-10 8:39 ` Igor Tertishny
2004-03-10 9:52 ` Sergey V Turchin
2004-03-10 9:57 ` Denis Ovsienko
2004-03-10 10:08 ` Igor Tertishny
2004-03-10 11:15 ` Sergey V Turchin
2004-03-10 11:23 ` Igor Tertishny
2004-03-10 11:18 ` Sergey V Turchin
2004-03-10 11:36 ` [devel] Re: Как заставить прогу найти библиотеку? Igor Tertishny
2004-03-10 11:56 ` Sergey V Turchin
2004-03-10 12:20 ` Igor Tertishny
2004-03-10 12:36 ` Sergey V Turchin
2004-03-10 12:48 ` Igor Tertishny
2004-03-10 12:35 ` Igor Tertishny
2004-03-10 13:47 ` Alexey Tourbin
2004-03-10 16:17 ` [devel] Re: Как заставить прогу тайти билиотеку? Алексей Любимов
2004-03-09 13:14 ` [devel] " Andrei Bulava
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040309164956.GN4270@solemn.turbinal.org \
--to=at@altlinux.ru \
--cc=devel@altlinux.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Team development discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
public-inbox-index devel
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.devel
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git