This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Patch for throw/catch problems


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]