From: Sergey Vlasov <vsu@altlinux.ru>
To: ALT Devel discussion list <devel@altlinux.ru>
Subject: Re: [devel] Re: I: Sisyphus base build system freeze plans
Date: Wed, 28 Apr 2004 16:33:31 +0400
Message-ID: <20040428123331.GA9063@master.mivlgu.local> (raw)
In-Reply-To: <20040428113507.GH25131@basalt.office.altlinux.org>
[-- Attachment #1: Type: text/plain, Size: 3159 bytes --]
On Wed, Apr 28, 2004 at 03:35:07PM +0400, Dmitry V. Levin wrote:
[...]
> > @@ -770,10 +790,27 @@ search_dir (const struct dir_entry *entr
> > continue;
> > }
> >
> > +
> > + /* A link may just point to itself. */
> > + if (is_link)
> > + {
> > + /* If the path the link points to isn't its soname and it is not
> > + .so symlink for ld(1) only, we treat it as a normal file. */
> > + const char *real_base_name = basename (real_file_name);
> > +
> > + if (strcmp (real_base_name, soname) != 0)
> > + {
> > + len = strlen (real_base_name);
> > + if (len < strlen (".so")
> > + || strcmp (real_base_name + len - strlen (".so"), ".so") != 0
> > + || strncmp (real_base_name, soname, len) != 0)
> > + is_link = 0;
> > + }
> > + }
> > +
> > if (real_name != real_file_name)
> > free (real_name);
> >
> > - /* Links will just point to itself. */
> > if (is_link)
> > {
> > free (soname);
> >
> > libMesaGL.so - это тоже ссылка (на libGL.so.1.4.501). Судя по
> > комментарию, такая ссылка должна была бы игнорироваться, но на самом
> > деле этого не происходит из-за третьей части написанного здесь условия
> > (strncmp (real_base_name, soname, len) != 0).
>
> По идее автора этого изменения, ссылка libMesaGL.so должна игнорироваться
> только в случае, если она ссылается на libMesaGL.so.*
Там всё ещё страннее - похоже, readlink() там нигде не вызывается,
поэтому real_file_name - это имя самой ссылки, а не то, на что она
показывает. Т.е., любая ссылка, имя которой не совпадает с soname,
и при этом не заканчивается на ".so" _или_ не начинается с soname,
будет считаться обычным файлом библиотеки (вне зависимости от того,
куда эта ссылка показывает).
Первые две проверки (на полное совпадение с soname и на *.so) мне
понятны. А вот третья выглядит как-то странно. Возможно,
подразумевалось что-то такое:
--- glibc-2.3.3-200404190147/elf/ldconfig.c.alt-ldconfig-links 2004-04-28 15:48:26 +0400
+++ glibc-2.3.3-200404190147/elf/ldconfig.c 2004-04-28 16:25:53 +0400
@@ -801,9 +801,9 @@ search_dir (const struct dir_entry *entr
if (strcmp (real_base_name, soname) != 0)
{
len = strlen (real_base_name);
- if (len < strlen (".so")
- || strcmp (real_base_name + len - strlen (".so"), ".so") != 0
- || strncmp (real_base_name, soname, len) != 0)
+ if ((len < strlen (".so")
+ || strcmp (real_base_name + len - strlen (".so"), ".so") != 0)
+ && strncmp (real_base_name, soname, len) != 0)
is_link = 0;
}
}
Хотя всё равно непонятно, зачем это нужно. Чтение ChangeLog
ситуацию особо не проясняет:
2003-08-26 Jakub Jelinek <jakub@redhat.com>
* elf/ldconfig.c (search_dir): When checking for GNU-style .so
link file use the real file name, not the resolved name we got by
following the symlinks.
2003-08-25 Jakub Jelinek <jakub@redhat.com>
* elf/ldconfig.c (search_dir): Treat symlink as regular file
if it won't point to itself unless it is .so symlink for the linker.
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2004-04-28 12:33 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-26 13:36 [devel] " Dmitry V. Levin
2004-04-26 15:41 ` [devel] " Michael Shigorin
2004-04-26 21:33 ` [devel] " Dmitry V. Levin
2004-04-27 4:33 ` Alexey I. Froloff
2004-04-27 6:24 ` [devel] [JT] " Michael Shigorin
2004-04-27 8:28 ` [devel] " Sergey V Turchin
2004-04-28 9:38 ` Sergey Bolshakov
2004-04-28 11:23 ` Dmitry V. Levin
2004-04-28 11:28 ` Sergey Bolshakov
2004-04-27 8:49 ` Leonid Khachaturov
2004-04-27 9:09 ` Yuri N. Sedunov
2004-04-27 9:15 ` [devel] Re: gnome and glibc-2.3.3 (was: Sisyphus base build system freeze plans) Vitaly Ostanin
2004-04-27 11:32 ` [devel] [JT] I: Sisyphus base build system freeze plans Alexey Morozov
2004-04-27 9:26 ` [devel] " Michael Shigorin
2004-04-27 10:34 ` Sergey Vlasov
2004-04-27 10:54 ` Dmitry V. Levin
2004-04-28 5:55 ` Sergey Vlasov
2004-04-28 6:08 ` Anton Farygin
2004-04-28 11:35 ` Dmitry V. Levin
2004-04-28 12:33 ` Sergey Vlasov [this message]
2004-04-28 14:24 ` Dmitry V. Levin
2004-04-28 14:00 ` Anton Farygin
2004-04-28 14:32 ` Dmitry V. Levin
2004-04-28 14:38 ` Sergey Vlasov
2004-04-28 14:45 ` Dmitry V. Levin
2004-04-27 10:56 ` [devel] " Dmitry V. Levin
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=20040428123331.GA9063@master.mivlgu.local \
--to=vsu@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