public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Robert Lipe <robertl@dgii.com>
To: law@cygnus.com
Cc: egcs@cygnus.com
Subject: Re: disturbing g++ 971031 results. defer-pop not to blame.
Date: Mon, 03 Nov 1997 09:43:00 -0000	[thread overview]
Message-ID: <19971103103101.15080@dgii.com> (raw)
In-Reply-To: <19971103011246.03918@dgii.com>

Found it.

[ disassembly showing crap in .fini deleted ] 

> If I take hte final link line:
> 
>  /play/negcs/gcc/ld -b elf -Ra,XPG4PLUS,ELF -YP,/usr/ccs/lib:/lib:/usr/lib \
>         -Qn /usr/ccs/lib/crt1.o /usr/ccs/lib/values-Xa.o \
>         /play/negcs/gcc/crtbegin.o -L/play/negcs/gcc -L/usr/ccs/bin \
>         -L/usr/ccs/lib -L/usr/local/lib net34.o -lstdc++ \
>         -lgcc -lcrypt -lgen -lc -lgcc /play/negcs/gcc/crtend.o \
>         /usr/ccs/lib/crtn.o
> 
> and play with the order (add crtn.o before or after -lstdc++) I have 
> reason to think that it's from something in libstdc++.   If I just
> hoist -lstdc++ down to the very last (and stick another -lgcc after
> it) I get a functioning executable.
> 
> Objdump --all-headers on libstdc++.a and all the .o's that go into
> it shows nothing in the .fini section.
> 
> How can I find out what this is and where it's coming from?

Ugh.  I'm going to be ill.

The stupid final link line listed above includes a '-L/usr/local/lib'
but does not include a -L/play/negcs/libraries.    This means that 
while I spent hours staring at a disassembly of 
/play/negcs/libraries/libstdc++/libstdc++.a that looked perfectly 
reasonable, the linker was using one from /usr/local/lib from 
June 2 that happens to contain crap in the .fini section.

Of course, the obvious way to fix this is to add -L/play/libraries
to the link line - but then '-mcoff' picks up the wrong libraries.

Part of me wonders why this is dependent upon the level of 
optimization and the stack layout of the net34.o object when 
the problem is "clearly" in a linked-in library, and part of 
me just wants to rewire my tests to manually include the 
appropriate libes for ELF and COFF and get on with my life.

RJL



      parent reply	other threads:[~1997-11-03  9:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-11-01 20:49 GCC 971031 on OpenServer Robert Lipe
1997-11-02 12:48 ` disturbing g++ 971031 results. defer-pop to blame? Robert Lipe
1997-11-02 19:06   ` Jeffrey A Law
1997-11-02 20:47     ` Robert Lipe
1997-11-02 22:44       ` Jeffrey A Law
1997-11-02 23:32         ` Robert Lipe
1997-11-03  2:06           ` Jeffrey A Law
1997-11-03  2:06         ` Robert Lipe
1997-11-03  1:51           ` Jeffrey A Law
1997-11-03  3:21             ` Andreas Schwab
1997-11-03  9:43             ` Robert Lipe
     [not found]           ` <16810.878541954.cygnus.egcs@hurl.cygnus.com>
1997-11-03  2:28             ` Jason Merrill
1997-11-03  9:43           ` Robert Lipe [this message]

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=19971103103101.15080@dgii.com \
    --to=robertl@dgii.com \
    --cc=egcs@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).