From: Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
To: law@cygnus.com
Cc: Robert Lipe <robertl@dgii.com>, egcs@cygnus.com
Subject: Re: disturbing g++ 971031 results. defer-pop to blame?
Date: Mon, 03 Nov 1997 03:21:00 -0000 [thread overview]
Message-ID: <vyzoh42xo55.fsf@issan.informatik.uni-dortmund.de> (raw)
In-Reply-To: <16810.878541954@hurl.cygnus.com>
Jeffrey A Law <law@cygnus.com> writes:
|> In message < 19971103011246.03918@dgii.com >you write:
|> > GDB that I built from 4.14-95q4 (i486-unknown-sco3.2v5.0.0elf) handles
|> > the binaries in question just fine. GDB 4.16 built from virgin FSF
|> > sources isn't useful on my ELF binaries. I'll chase this later...
|> Sounds wise :-)
|> > Program received signal SIGSEGV, Segmentation fault.
|> > 0x8059187 in .fini ()
|> Now we're getting somewhere...
|> > If I look at the tail end of the object, the reason for our
|> > crash is more apparent:
|> >
|> > Disassembly of section .fini:
|> >
|> > 0805917c <_fini>:
|> > 805917c: e8 c7 f9 fe ff call 8048b48 <__do_global_dtors_aux>
|> > 8059181: 90 nop
|> > 8059182: 90 nop
|> > 8059183: 90 nop
|> >
|> > 08059184 <.fini>:
|> > 8059184: 4c decl %esp
|> > 8059185: cd 04 int $0x4
|> > 8059187: 08 c2 orb %al,%dl
|> >
|> > 08059188 <.fini>:
|> > 8059188: c2 00 00 ret $0x0
|> > 805918b: 90 nop
|> Hmmmm.
|> If you look at fini_dummy in crtstuff.c you'll see how this happened:
|> static void
|> fini_dummy ()
|> {
|> asm (FINI_SECTION_ASM_OP);
|> __do_global_dtors_aux ();
|> #ifdef FORCE_FINI_SECTION_ALIGN
|> FORCE_FINI_SECTION_ALIGN;
|> #endif
|> asm (TEXT_SECTION_ASM_OP);
|> }
|> We switch into the FINI section, emit the call, align the section,
|> then switch out -- without ever emitting a return.
This is ok, the final return is added by crtn.o which is linked in this
example at 08059188. The invalid instructions between 08059184 and
08059188 are coming from a different object.
--
Andreas Schwab "And now for something
schwab@issan.informatik.uni-dortmund.de completely different"
schwab@gnu.org
next prev parent reply other threads:[~1997-11-03 3:21 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 [this message]
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 ` disturbing g++ 971031 results. defer-pop not to blame Robert Lipe
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=vyzoh42xo55.fsf@issan.informatik.uni-dortmund.de \
--to=schwab@issan.informatik.uni-dortmund.de \
--cc=egcs@cygnus.com \
--cc=law@cygnus.com \
--cc=robertl@dgii.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).