From: Jakub Jelinek <jakub@redhat.com>
To: Andreas Schwab <schwab@suse.de>
Cc: java-patches@gcc.gnu.org, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] Fix linking with -findirect-dispatch
Date: Tue, 16 Apr 2013 10:08:00 -0000 [thread overview]
Message-ID: <20130416100851.GP12880@tucnak.redhat.com> (raw)
In-Reply-To: <mvmhaj6u7a5.fsf@hawking.suse.de>
On Tue, Apr 16, 2013 at 11:57:54AM +0200, Andreas Schwab wrote:
> Jakub Jelinek <jakub@redhat.com> writes:
>
> > Why would that be a problem? libgcj.so the linker sees (i.e. the dummy
> > library) doesn't intentionally have DT_NEEDED libgcj.so.N, programs and
> > shared libraries linked with -findirect-dispatch should be adding
> > libgcj_bc.so to DT_NEEDED, not libgcj.so.N.
>
> But the dummy libgcj_bc.so doesn't define _Jv_MonitorExit, or any other
> relevant symbol.
That is not true. Build from yesterday, on x86_64-linux:
$ readelf -Wa libjava/.libs/libgcj_bc.so | grep _Jv_MonitorExit; readelf -d libjava/.libs/libgcj_bc.so | grep NEEDED; echo ==; readelf -Wa libjava/.libs/libgcj_bc.so.1 | grep _Jv_MonitorExit; readelf -d libjava/.libs/libgcj_bc.so.1 | grep NEEDED
25: 0000000000001250 2 FUNC GLOBAL DEFAULT 10 _Jv_MonitorExit
77: 0000000000001250 2 FUNC GLOBAL DEFAULT 10 _Jv_MonitorExit
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
0x0000000000000001 (NEEDED) Shared library: [libgcc_s.so.1]
==
0x0000000000000001 (NEEDED) Shared library: [libgcj.so.14]
The point of -findirect-dispatch linking against -lgcj_bc rather than -lgcj
is that whenever N in libgcj.so.N is bumped, you don't need to rebuild all the
-findirect-dispatch compiled/linked programs and shared libraries, only if
you build a direct dispatch programs or shared libraries.
So, -findirect-dispatch programs and shared libraries should have:
0x0000000000000001 (NEEDED) Shared library: [libgcj_bc.so.1]
rather than:
0x0000000000000001 (NEEDED) Shared library: [libgcj.so.14]
Jakub
next prev parent reply other threads:[~2013-04-16 10:08 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-16 8:36 Andreas Schwab
2013-04-16 8:39 ` Jakub Jelinek
2013-04-16 8:59 ` Bryce McKinlay
2013-04-16 9:13 ` Andreas Schwab
2013-04-16 9:19 ` Jakub Jelinek
2013-04-16 9:37 ` Andreas Schwab
2013-04-16 9:49 ` Jakub Jelinek
2013-04-16 9:55 ` Matthias Klose
2013-04-26 11:22 ` Matthias Klose
2013-04-26 11:50 ` Andrew Haley
2013-04-16 9:57 ` Andreas Schwab
2013-04-16 10:08 ` Jakub Jelinek [this message]
2013-04-16 10:11 ` Andreas Schwab
2013-04-16 10:26 ` Jakub Jelinek
2013-04-16 10:31 ` Andreas Schwab
2013-04-16 16:13 ` Andreas Schwab
2013-04-16 16:19 ` Jakub Jelinek
2013-04-16 17:22 ` Andreas Schwab
2013-06-03 10:56 ` Andreas Schwab
2013-04-16 16:39 ` Bryce McKinlay
2013-04-17 13:17 ` Andreas Schwab
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=20130416100851.GP12880@tucnak.redhat.com \
--to=jakub@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=java-patches@gcc.gnu.org \
--cc=schwab@suse.de \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).