public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: ak@muc.de
To: Jason Merrill <jason@cygnus.com>
Cc: ak@muc.de, egcs@cygnus.com
Subject: Re: C++ name mangling, old and new versions?
Date: Thu, 05 Mar 1998 15:33:00 -0000	[thread overview]
Message-ID: <19980305060218.21443@fred.muc.de> (raw)
In-Reply-To: <u9ogzlix36.fsf@yorick.cygnus.com>

On Thu, Mar 05, 1998 at 05:24:29AM +0100, Jason Merrill wrote:
> >>>>> ak  <ak@muc.de> writes:
> 
> > On Thu, Mar 05, 1998 at 04:37:33AM +0100, Jason Merrill wrote:
> >> >>>>> Andi Kleen <ak@muc.de> writes:
> >> 
> >> > I had good look with -fno-rtti -fno-exceptions together with a 2.7.2
> >> > compiled Qt. The vtable layout is different when RTTI is enabled, so
> >> > egcs protects against mistakes by encoding that in the mangled name.
> >> 
> >> Both those statements are false for -fno-rtti, though they are true of
> >> -fvtable-thunks.
> 
> > You mean the mangling is only changed (between -frtti/no-rtti) when
> > vtable-thunks is enabled? If this is true how is the typeinfo encoded
> > then when vtable-thunks is not enabled?
> 
> No.  -frtti has no effect on vtable layout or mangling, ever.
> -fvtable-thunks changes vtable layout and mangling.
> 
> If -fno-rtti, the RTTI entry in the vtable is set to zero, but the layout
> is the same.

I see. I didn't know that 2.7.2 already had a reserved vtable entry for
the rtti function(1), therefore the confusion. The original point still holds -
a 2.7.2 compiled shared library Qt doesn't link with a egcs program (even 
though Qt doesn't use RTTI) unless -fno-exceptions -fno-rtti is specified. 

It complains about missing "Class type_info function" (that is probably the 
RTTI entry you were refering to), and missing RTTI (__rtti_class) and 
exceptions function from the runtime library. I don't know why -fno-rtti/
-fno-exceptions makes a difference for the runtime library.


-Andi

(1) Thanks to rth for the pointer.

  reply	other threads:[~1998-03-05 15:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-03-04  6:10 T. Huld
1998-03-04 12:45 ` Martin von Loewis
1998-03-04 19:27 ` Andi Kleen
     [not found] ` <k2n2f5vms1.fsf.cygnus.egcs@zero.aec.at>
1998-03-04 19:38   ` Jason Merrill
1998-03-04 20:12     ` ak
1998-03-04 20:25       ` Jason Merrill
1998-03-05 15:33         ` ak [this message]
1998-03-05 15:33           ` Jason Merrill
1998-03-05  0:18       ` Martin von Loewis

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=19980305060218.21443@fred.muc.de \
    --to=ak@muc.de \
    --cc=egcs@cygnus.com \
    --cc=jason@cygnus.com \
    /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).