public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Sergei Ivanov <svivanov@pdmi.ras.ru>
To: hjl@lucon.org (H.J. Lu)
Cc: svivanov@pdmi.ras.ru, egcs@cygnus.com
Subject: Re: Why link C with crtstuff? [patch]
Date: Mon, 27 Apr 1998 13:59:00 -0000	[thread overview]
Message-ID: <m0yTqwb-000B93C@svivano.pdmi.ras.ru> (raw)
In-Reply-To: <m0yTcI4-000598C@ocean.lucon.org>

Sorry if this is a double posting. Something went wrong at the first attempt.

> > No @@ here, patch (2.4) just skips this.
> 
> Ooops. Here is the new one.
> 
> > Also, it seems to be against a snapshot (there is no s-crtS in 1.0.2).
> 
> It is stamp-crtS in 1.0.2. Just apply it by hand for 1.0.2.

It works, in a sense that it does not statically link frame.o to main(){},
and a recompiled shared library has __register_frame_info etc,
so it does not break existing binaries.

Still it is unpleasant that the binary appears dependent on these
symbols if linked with the library (and now with weak symbols even 
an extra -lgcc does not help).

Maybe use different names for static and shared things?  For example,
let some __register_frame_info__static in libgcc be a copy/alias/call to
__register_frame_info and let crtbegin.o have this new symbol weak extern
while crtbeginS.o uses __register_frame_info.

A side note: dependence on gcc internals from shared libs it not only
a problem of compatibility between gcc versions. A library could be
rewritten/optimized so that it stops using a certain gcc internal
so that it disappears. The author would normally change only a minor
version, but in this case the library becomes incompatible.

Sergei


  reply	other threads:[~1998-04-27 13:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <m0yTYbl-000598C@ocean.lucon.org>
1998-04-26 17:15 ` Sergei Ivanov
1998-04-26 21:56   ` H.J. Lu
1998-04-27 13:59     ` Sergei Ivanov [this message]
     [not found] <m0yU6e1-000B93C@svivano.pdmi.ras.ru>
1998-04-28 14:10 ` H.J. Lu
1998-04-28 10:26   ` Ian Lance Taylor
1998-04-28 10:47     ` H.J. Lu
1998-04-25 17:40 Sergei Ivanov
1998-04-26  0:01 ` Jeffrey A Law
1998-04-26  0:19 ` H.J. Lu
1998-04-26 10:05   ` Jeffrey A Law
1998-04-26 10:26     ` H.J. Lu
1998-04-26 12:08     ` Ian Lance Taylor
1998-04-26 12:45   ` Sergei Ivanov

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=m0yTqwb-000B93C@svivano.pdmi.ras.ru \
    --to=svivanov@pdmi.ras.ru \
    --cc=egcs@cygnus.com \
    --cc=hjl@lucon.org \
    /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).