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: Sun, 26 Apr 1998 12:45:00 -0000	[thread overview]
Message-ID: <199804262038.AAA17714@euclid.pdmi.ras.ru> (raw)
In-Reply-To: <m0yTKUE-000598C@ocean.lucon.org>

> 
> The patch is wrong. Please try this patch.
> 
Thanks. It works for all my primitive tests except one.
I have a shared library compiled by gcc-2.8.1 (libvga-1.2.13, but this
should not be important):

~/test$ nm -D /usr/lib/libvga.so.1 | grep register_frame_info
000164e0 T __deregister_frame_info
0001644c T __register_frame_info
00016498 T __register_frame_info_table

I compile "main(){}" with -lvga. It works ok but:

~/test/oldvga$ nm -D a.out | grep register_frame_info
         U __deregister_frame_info
         U __register_frame_info

Now I recompile the library and replace the old one:

~/test$ nm -D /usr/lib/libvga.so.1 | grep register_frame_info
         U __deregister_frame_info
         U __register_frame_info

(btw, are they really need to be U, not just absent?)
The binary stops working:

~/test/oldvga$ ./a.out
./a.out: can't resolve symbol '__register_frame_info'

This is a kind of vicious circle. With an old-gcc made library,
it's hard to compile a binary that will work with a new-gcc library.
(old-gcc = without the patch, new-gcc = with the patch).

Sergei

  parent reply	other threads:[~1998-04-26 12:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
     [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
     [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

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=199804262038.AAA17714@euclid.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).