From: "Dmitry V. Levin" <ldv@altlinux.org>
To: ALT Linux Team development discussions <devel@lists.altlinux.org>
Subject: Re: [devel] I: rpm 4.0.4-alt98.49, latter rain
Date: Wed, 6 Oct 2010 01:39:06 +0400
Message-ID: <20101005213906.GA7528@altlinux.org> (raw)
In-Reply-To: <20101005101717.GF9992@altlinux.org>
[-- Attachment #1: Type: text/plain, Size: 2612 bytes --]
On Tue, Oct 05, 2010 at 02:17:17PM +0400, Alexey Tourbin wrote:
> On Tue, Oct 05, 2010 at 02:01:03PM +0400, Dmitry V. Levin wrote:
> > overlinked libraries означает, что ELF cлинкован с тем, с чем не должен.
> > underlinked libraries означает, что ELF не cлинкован с тем, с чем должен.
> >
> > С первым мы уже давно боремся с помощью -Wl,--as-needed, поэтому наличие
> > overlinked libraries, скорее всего, является следствием использования
> > -Wl,--no-as-needed.
> >
> > Cо вторым мы тоже давно боремся с помощью "%set_verify_elf_method strict".
>
> C недолинковкой вопрос несколько сложнее: verify-elf/ldd не ругается
> на непрямые транзитивные зависимости (по символам), если они разрешаются
> при загрузке. В этом вся соль. И в этом одна из претензий к тулчейну!
>
> Я сейчас не могу придумать тривиальный пример, вот менее тривиальный
> пример:
>
> lib.req: WARNING: /usr/lib64/libwx_gtk2u_adv-2.8.so.0.7.0: underlinked libraries: /usr/lib64/libX11.so.6
> lib.req: WARNING: /usr/lib64/libwx_gtk2u_core-2.8.so.0.7.0: underlinked libraries: /usr/lib64/libX11.so.6
>
> Как так можно было слинковать?
> Проблемы в консерватории имеются.
Вот тривиальный пример:
$ cat test.c
#include <gtk/gtk.h>
#include <X11/Xlib.h>
int foo(void){return !gtk_major_version || !XOpenDisplay(0);}
$ gcc -fpic -shared test.c -o test.so $(pkg-config --cflags gtk+-2.0) -lgtk-x11-2.0
$ /usr/lib/rpm/lib.req test.so
rtld(GNU_HASH)
libc.so.6(GLIBC_2.2.5)(64bit)
lib.req: WARNING: /usr/src/tmp/test.so: underlinked libraries: /usr/lib64/libX11.so.6
lib.req: WARNING: libgtk-x11-2.0.so.0()(64bit) is not yet set-versioned
libgtk-x11-2.0.so.0()(64bit)
$ readelf -d test.so |fgrep NEEDED
0x0000000000000001 (NEEDED) Shared library: [libgtk-x11-2.0.so.0]
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
И ещё пример:
$ cat test.c
#include <X11/Xlib.h>
int foo(void){return !XOpenDisplay(0);}
$ gcc -fpic -shared test.c -o test.so $(pkg-config --cflags gtk+-2.0) -Wl,--no-as-needed -lgtk-x11-2.0
$ /usr/lib/rpm/lib.req test.so
rtld(GNU_HASH)
libc.so.6(GLIBC_2.2.5)(64bit)
lib.req: WARNING: /usr/src/tmp/test.so: overlinked libraries: /usr/lib64/libgtk-x11-2.0.so.0
lib.req: WARNING: /usr/src/tmp/test.so: underlinked libraries: /usr/lib64/libX11.so.6
libgtk-x11-2.0.so.0()(64bit)
$ readelf -d test.so |fgrep NEEDED
0x0000000000000001 (NEEDED) Shared library: [libgtk-x11-2.0.so.0]
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
Только откуда следует, что это поведение ld(1) неправильное?
--
ldv
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2010-10-05 21:39 UTC|newest]
Thread overview: 99+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-04 19:35 Alexey Tourbin
2010-10-04 19:41 ` Aleksey Novodvorsky
2010-10-04 20:24 ` Andrey Rahmatullin
2010-10-04 20:30 ` Dmitry V. Levin
2010-10-04 20:34 ` Andrey Rahmatullin
2010-10-05 8:18 ` Michael Shigorin
2010-10-04 20:40 ` Alexey I. Froloff
2010-10-04 20:47 ` Alexey Tourbin
2010-10-04 20:50 ` Alexey I. Froloff
2010-10-04 20:53 ` Aleksey Novodvorsky
2010-10-04 20:34 ` Aleksey Novodvorsky
2010-10-04 20:44 ` sbolshakov
2010-10-04 20:47 ` Andrey Rahmatullin
2010-10-05 9:28 ` Alexey Tourbin
2010-10-05 10:41 ` Alexey I. Froloff
2010-10-05 11:05 ` Kirill A. Shutemov
2010-10-05 11:08 ` Alexey I. Froloff
2010-10-05 11:22 ` Dmitry V. Levin
2010-10-05 11:27 ` Alexey I. Froloff
2010-10-05 17:32 ` Alexey Tourbin
2010-10-05 18:57 ` Alexey I. Froloff
2010-10-05 19:28 ` Alexey Tourbin
2010-10-05 19:50 ` Alexey I. Froloff
2010-10-05 20:11 ` Alexey Tourbin
2010-10-06 2:59 ` REAL
2010-10-06 5:19 ` Ildar Mulyukov
2010-10-06 6:34 ` Sergei Epiphanov
2010-10-04 20:41 ` Alexey Tourbin
2010-10-04 21:40 ` Alexey Tourbin
2010-10-05 2:03 ` REAL
2010-10-05 3:40 ` Anton Farygin
2010-10-05 3:04 ` REAL
2010-10-05 4:29 ` Денис Смирнов
2010-10-08 10:02 ` REAL
2010-10-05 4:36 ` Anton Farygin
2010-10-05 9:38 ` Alexey Tourbin
2010-10-05 9:35 ` Alexey Tourbin
2010-10-05 8:46 ` REAL
2010-10-05 9:51 ` Alexey Tourbin
2010-10-05 9:00 ` REAL
2010-10-05 9:58 ` Ildar Mulyukov
2010-10-05 9:11 ` REAL
2010-10-05 11:58 ` Денис Смирнов
2010-10-05 11:09 ` Kirill A. Shutemov
2010-10-05 11:15 ` Alexey Tourbin
2010-10-05 10:01 ` Dmitry V. Levin
2010-10-05 10:17 ` Alexey Tourbin
2010-10-05 9:30 ` REAL
2010-10-05 12:15 ` Led
2010-10-06 2:10 ` REAL
2010-10-06 6:26 ` Denis Pynkin
2010-10-06 6:03 ` REAL
2010-10-05 9:42 ` REAL
2010-10-05 10:54 ` Alexey Tourbin
2010-10-05 10:28 ` REAL
2010-10-05 12:10 ` Alexey Tourbin
2010-10-06 2:03 ` REAL
2010-10-06 2:25 ` REAL
2010-10-06 3:07 ` REAL
2010-10-06 5:38 ` Ildar Mulyukov
2010-10-06 9:11 ` Michael Shigorin
2010-10-06 9:47 ` Ildar Mulyukov
2010-10-08 1:46 ` REAL
2010-10-08 6:59 ` Michael Shigorin
2010-10-08 8:20 ` Dmitry V. Levin
2010-10-08 7:31 ` REAL
2010-10-06 9:14 ` Dmitry V. Levin
2010-10-06 8:50 ` REAL
2010-10-06 10:29 ` Dmitry V. Levin
2010-10-06 9:38 ` REAL
2010-10-05 12:06 ` Денис Смирнов
2010-10-05 13:04 ` Kirill A. Shutemov
2010-10-05 20:26 ` Dmitry V. Levin
2010-10-05 21:39 ` Dmitry V. Levin [this message]
2010-10-05 21:56 ` Alexey I. Froloff
2010-10-05 22:01 ` Dmitry V. Levin
2010-10-05 22:04 ` Alexey I. Froloff
2010-10-05 22:12 ` Dmitry V. Levin
2010-10-05 22:29 ` Dmitry V. Levin
2010-10-06 8:22 ` Alexey I. Froloff
2010-10-06 9:18 ` Dmitry V. Levin
2010-10-06 9:36 ` Alexey I. Froloff
2010-10-06 16:13 ` Dmitry V. Levin
2010-10-06 17:29 ` Alexey I. Froloff
2010-10-06 17:34 ` Dmitry V. Levin
2015-11-10 17:13 ` Sergey Y. Afonin
2015-11-11 13:22 ` Sergey Afonin
2010-10-05 2:47 ` Денис Смирнов
2010-10-05 6:01 ` Stanislav Ievlev
2010-10-05 10:01 ` Alexey Tourbin
2010-10-08 14:52 ` Aleksey Avdeev
2010-10-08 15:34 ` Sergey Vlasov
2010-10-08 17:38 ` Alexey Tourbin
2010-10-08 23:34 ` Aleksey Avdeev
2010-10-09 0:03 ` Денис Смирнов
2010-10-09 13:13 ` Aleksey Avdeev
2010-10-09 13:22 ` Денис Смирнов
2010-10-09 13:34 ` Aleksey Avdeev
2010-10-09 17:02 ` Денис Смирнов
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=20101005213906.GA7528@altlinux.org \
--to=ldv@altlinux.org \
--cc=devel@lists.altlinux.org \
/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