From: Daniel Jacobowitz <drow@false.org>
To: gcc-patches@gcc.gnu.org
Subject: Re: [C++ PATCH] Optimize C++ comdat ctors/dtors in classes without virtual bases (PR c++/3187, take 3)
Date: Tue, 01 Dec 2009 21:50:00 -0000 [thread overview]
Message-ID: <20091201213602.GA23823@caradoc.them.org> (raw)
In-Reply-To: <20091201211538.GV22813@hs20-bc2-1.build.redhat.com>
On Tue, Dec 01, 2009 at 04:15:38PM -0500, Jakub Jelinek wrote:
> That's why this is done only if the symbols are weak. If you mix .o files
> from different G++ versions (pre-4.5 and 4.5+), then worst case you'll
> end up with some .text duplication, but as the symbols are weak, the linker
> will just pick one of the definitions for the symbols. When you don't mix
> .o files from different G++ versions in one .so or executable, you on the
> other side gain code size savings.
I see. Unless the ABI has something to say on the matter, I would
suggest using a GNU-specific string for the COMDAT signature; IMO
that's less confusing.
As I said on IRC, I tried to test my theories with ARM's compiler.
But that compiler already causes GNU ld fits; among other things, it
puts both C1 and C2 constructors into the group with a C1 signature.
And something involving discarded hidden symbols made my linker
fall down, anyway.
--
Daniel Jacobowitz
CodeSourcery
prev parent reply other threads:[~2009-12-01 21:36 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-30 22:38 Jakub Jelinek
2009-12-01 3:53 ` Jason Merrill
2009-12-01 8:07 ` Jakub Jelinek
2009-12-01 15:39 ` Jason Merrill
2009-12-01 9:52 ` [C++ PATCH] Optimize C++ comdat ctors/dtors in classes without virtual bases (PR c++/3187, take 4) Jakub Jelinek
2009-12-01 15:40 ` Jakub Jelinek
2009-12-01 16:38 ` Dave Korn
2009-12-01 19:35 ` [C++ PATCH] Optimize C++ comdat ctors/dtors in classes without virtual bases (PR c++/3187, take 5) Jakub Jelinek
2009-12-01 20:14 ` Jason Merrill
2009-12-01 21:03 ` Dave Korn
2009-12-04 18:19 ` Dave Korn
2009-12-04 18:29 ` Jakub Jelinek
2009-12-04 18:46 ` Dave Korn
2009-12-27 13:36 ` H.J. Lu
2009-12-01 21:15 ` [C++ PATCH] Optimize C++ comdat ctors/dtors in classes without virtual bases (PR c++/3187, take 3) Daniel Jacobowitz
2009-12-01 21:20 ` Jakub Jelinek
2009-12-01 21:50 ` Daniel Jacobowitz [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=20091201213602.GA23823@caradoc.them.org \
--to=drow@false.org \
--cc=gcc-patches@gcc.gnu.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
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).