This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch for throw/catch problems
- To: Mark Mitchell <mark at codesourcery dot com>
- Subject: Re: Patch for throw/catch problems
- From: Jakub Jelinek <jakub at redhat dot com>
- Date: Tue, 14 Aug 2001 03:59:40 -0400
- Cc: Richard Henderson <rth at redhat dot com>, David Lampell <david dot lampell at smarts dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Jason Merrill <jason at redhat dot com>
- References: <20010813162531.A7601@redhat.com> <10280000.997759781@warlock.codesourcery.com>
- Reply-To: Jakub Jelinek <jakub at redhat dot com>
On Mon, Aug 13, 2001 at 08:29:41PM -0700, Mark Mitchell wrote:
> --On Monday, August 13, 2001 04:25:31 PM -0700 Richard Henderson
> <rth@redhat.com> wrote:
>
> > That said, I can guess what the problem might be, since I've
> > brought up the issue here before. Mark, Jason, is this
> > commentary enough to jog your memory, or should I go track
> > down the original discussions?
I have a related thing, which I haven't heard from Jason about yet
and IMHO does not depend on whether typeinfo comparison is done using strcmp
or pointer comparison:
Correct me if I'm wrong, but it is my understanding that _ZTS* strings are
only referenced from second field of the corresponding _ZTI* object (with
the same suffixes). If this is true, then IMHO all _ZTS* strings should be
.hidden if assembler supports this, because as _ZTI* symbols are weak
globals, only one of the potentially many _ZTI structures with the same name
will be used and as _ZTI and _ZTS always come together, _ZTS string from the
same program/shared library will be used too. So, the _ZTS string can be
.hidden and we can avoid many run-time relocations, costly symbol lookups
and in the case of prelinking potential conflicts.
Also, I think it is a pitty that there is the pointer comparison requirement
in the new ABI. I think rtti is actually used far less than virtual table,
and at the cost of slightly slower std::type_info::operator == and
std::type_info::before which I think is not that common we could .hidden
_ZTI symbols too (thus kill yet another load of run-time relocs, lookups and
conflicts). But if nothing can be done about this requirement, at least
.hidden _ZTS* would be very useful.
I will provide a patch if there is agreement on this.
Jakub