public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Joe Buck <jbuck@synopsys.com>
To: pkoning@xedia.com (Paul Koning)
Cc: mmitchell@usa.net, bothner@cygnus.com, egcs@cygnus.com
Subject: Re: -fno-exceptions and libgcc.a
Date: Mon, 06 Oct 1997 09:55:00 -0000	[thread overview]
Message-ID: <199710061655.JAA16691@atrus.synopsys.com> (raw)
In-Reply-To: <9710061337.AA24175@kona.>

>  Mark> I suggest a different scheme:
> 
>  Mark> o The default remains -fno-exceptions when compiling.
> 
>  Mark> o At link-time, if gcc is used to link the executable, we
>  Mark> remove the .eh_frame section.  If g++/c++ is used, we keep it.
> 
> Hm. I tend to forget "g++" even exists -- I always compile everything
> by calling "gcc" and letting it sort out what to do with the file.

All g++ and c++ do is invoke gcc with the right options, so what Mark
is really saying is that there is a flag that tells the linker (or some
program that is run just before the linker, like collect) to remove
the .eh_frame section.  My counter-proposal was to have the linker
remove the .eh_frame section if and only if no code in the executable
throws an exception (meaning that there is some flag in the object
file indicating this).  Of course this can only be an optimization;
some users will have collect + the native linker.

> Conversely, you also need a solution for those who invoke "ld"
> directly (as opposed to indirectly via gcc or g++).

Those who invoke ld directly, unless they are using the GNU linker,
won't get correct C++ programs (since constructors for file-scope
objects won't be called).


  reply	other threads:[~1997-10-06  9:55 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-10-03 17:13 Mike Stump
1997-10-04  0:11 ` Per Bothner
1997-10-04  8:08   ` Mark Mitchell
1997-10-04 18:17     ` Joe Buck
1997-10-06  6:37     ` Paul Koning
1997-10-06  9:55       ` Joe Buck [this message]
1997-10-06 10:16         ` Mark Mitchell
1997-10-06 13:13           ` Per Bothner
1997-10-06 16:49             ` Richard Henderson
1997-10-06 10:12       ` Mark Mitchell
1997-10-04 11:20   ` Oleg Krivosheev
1997-10-04 17:32     ` Joe Buck
1997-10-05 19:28       ` Oleg Krivosheev
  -- strict thread matches above, loose matches on Subject: below --
1997-10-06 12:51 Mike Stump
     [not found] <m0xHF6U-0004eeC.cygnus.egcs@ocean.lucon.org>
1997-10-03 17:44 ` Jason Merrill
1997-10-03 14:17 H.J. Lu

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=199710061655.JAA16691@atrus.synopsys.com \
    --to=jbuck@synopsys.com \
    --cc=bothner@cygnus.com \
    --cc=egcs@cygnus.com \
    --cc=mmitchell@usa.net \
    --cc=pkoning@xedia.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).