From: "Dmitry V. Levin" <ldv@altlinux.org>
To: ALT Devel discussion list <devel@lists.altlinux.org>
Subject: Re: [devel] libstdc++4.1-devel сломан?
Date: Fri, 2 Jun 2006 18:06:46 +0400
Message-ID: <20060602140646.GF4604@basalt.office.altlinux.org> (raw)
In-Reply-To: <20060602140148.GB7502@master.mivlgu.local>
[-- Attachment #1: Type: text/plain, Size: 1164 bytes --]
On Fri, Jun 02, 2006 at 06:01:48PM +0400, Sergey Vlasov wrote:
[...]
> > Ну и что? Часть символов живёт в ld.so и тем самым делает -Wl,-z,defs
> > малопригодным на практике.
>
> $ cat test_exceptions.cpp
> int main(int argc, char **argv)
> {
> throw 0;
> }
>
> Вот это работает:
>
> $ gcc -Wl,-z,defs -o test_exceptions test_exceptions.cpp -lsupc++
>
> При этом получаемый исполняемый файл содержит ld-linux.so.2 в DT_NEEDED
> (чего обычно не происходит).
>
> А вот это уже не работает:
>
> $ gcc -Wl,-z,defs -shared -fPIC -o test_exceptions.so test_exceptions.cpp -lsupc++
> /usr/lib/gcc/i586-alt-linux/4.1.0/libsupc++.a(eh_globals.o): In function `__gnu_internal::get_global()':
> eh_globals.cc:(.text._ZN14__gnu_internal10get_globalEv+0x17): undefined reference to `___tls_get_addr'
> collect2: ld returned 1 exit status
>
> Другой вопрос - зачем может быть нужно линковать разделяемую библиотеку с
> libsupc++.a, создавая тем самым как минимум дублирование кода. Если
> использовать нормальную разделяемую libstdc++, никаких проблем с
> -Wl,-z,defs не возникает.
О! Это существенно меняет дело.
--
ldv
[-- Attachment #2: Type: application/pgp-signature, Size: 191 bytes --]
prev parent reply other threads:[~2006-06-02 14:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-01 15:36 Valery V. Inozemtsev
2006-06-01 15:43 ` Dmitry V. Levin
2006-06-01 16:23 ` Valery V. Inozemtsev
2006-06-01 16:41 ` Alexey Tourbin
2006-06-02 7:47 ` Damir Shayhutdinov
2006-06-02 11:00 ` Alexey Tourbin
2006-06-02 13:17 ` Dmitry V. Levin
2006-06-02 13:54 ` Alexey Tourbin
2006-06-02 14:02 ` Dmitry V. Levin
2006-06-02 14:25 ` Alexey Tourbin
2006-06-02 14:01 ` Sergey Vlasov
2006-06-02 14:06 ` Dmitry V. Levin [this message]
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=20060602140646.GF4604@basalt.office.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