public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: hjl@lucon.org (H.J. Lu)
To: law@cygnus.com
Cc: gcc2@cygnus.com, egcs@cygnus.com
Subject: Re: gcc 2.8.0 is broken on linux/x86 and more bug
Date: Fri, 12 Dec 1997 03:55:00 -0000	[thread overview]
Message-ID: <m0xgQVs-0004ecC@ocean.lucon.org> (raw)
In-Reply-To: <17304.881914983@hurl.cygnus.com>

>   > How does register_frame/register_frame_new get called? They are
>   > called by crtbegin.o/collect2. User doesn't use them directly.
>   > Since they are under our control, we always call the right one.
> But we don't have control over any programs or libraries that were
> compiled with the old interfaces right?  Thus, it's possible to get
> code which uses both.  Thus we have to be able to handle both right?

That is ok since we keep both. My patch keeps the old interface and
gives the new interface a new name.

> 
> Or are you saying that a library called with the old version would be
> entirely self contained and thus we don't have to worry about mixing?
> 

Yes. One shared library will only call one of the old/new interfaces
which is determined at the library build time by gcc.

> 
> Please be explicit so that we can all understand the problem and work
> towards a correct solution and avoid having to go through this again.
 
My current glibc shared library, which, BTW, uses the old interface
in its private crtbegin.o. But my new binaries generated by gcc 2.8.0
use the new one. At the startup time, the .init section is called first.

1. My glibc shared library calls __register_frame (__EH_FRAME_BEGIN__);
2. My binary calls __register_frame_new (__EH_FRAME_BEGIN__, &object);

Upon exit, the .fini section is called.

1. My glibc shared library calls __deregister_frame (__EH_FRAME_BEGIN__);
2. My binary calls __deregister_frame_new (__EH_FRAME_BEGIN__);

Please keep in mind, __EH_FRAME_BEGIN__ is a static variable local
to each binary. Since we keep both interfaces, we are ok.



-- 
H.J. Lu (hjl@gnu.org)

  reply	other threads:[~1997-12-12  3:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <9712112330.AA18404@vlsi1.ultra.nyu.edu>
1997-12-11 20:29 ` H.J. Lu
1997-12-11 23:56   ` Jeffrey A Law
1997-12-12  3:55     ` H.J. Lu
1997-12-12  0:18       ` Jeffrey A Law
1997-12-12  1:52         ` H.J. Lu
1997-12-12  3:55           ` Jeffrey A Law
1997-12-12  3:55             ` H.J. Lu [this message]
1997-12-12  3:55               ` Jeffrey A Law

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=m0xgQVs-0004ecC@ocean.lucon.org \
    --to=hjl@lucon.org \
    --cc=egcs@cygnus.com \
    --cc=gcc2@cygnus.com \
    --cc=law@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).