From: Andreas Schwab <schwab@suse.de>
To: Steve Ellcey <sje@cup.hp.com>
Cc: binutils@sources.redhat.com, amodra@bigpond.net.au
Subject: Re: copy_private_bfd_data in bfd/elf.c question
Date: Fri, 21 Jun 2002 09:28:00 -0000 [thread overview]
Message-ID: <jek7osfvfp.fsf@sykes.suse.de> (raw)
In-Reply-To: <200206211526.IAA18732@hpsje.cup.hp.com> (Steve Ellcey's message of "Fri, 21 Jun 2002 08:26:47 -0700 (PDT)")
Steve Ellcey <sje@cup.hp.com> writes:
|> > How about posting before/after output of readelf -S -l, so we can
|> > have a clue as to what is going on.
|>
|> Ok, here is an example (on IA64 HP-UX) of using strip on a small
|> executable where the executable coredumps after being stripped. This is
|> using the standard binutils without our local changes to
|> copy_private_bfd_data.
|>
|> [hpadl731] $ cat x.c
|> main ()
|> {
|> printf("hi\n");
|> }
|> [hpadl731] $ gcc x.c -o x
|> [hpadl731] $ ./x
|> hi
|> [hpadl731] $ readelf -S -I x
|> There are 33 section headers, starting at offset 0x1778:
|>
|> Section Headers:
|> [Nr] Name Type Addr Off Size ES Flg Lk Inf Al
|> [ 0] NULL 00000000 ffffffff 000000 00 0 0 0
|> [ 1] .dynamic DYNAMIC 04000178 000178 0000b8 08 A 0 0 8
|> [ 2] .dynsym DYNSYM 04000230 000230 0001a0 10 A 3 0 8
|> [ 3] .dynstr STRTAB 040003d0 0003d0 00024a 00 A 0 0 1
|> [ 4] .hash HASH 04000620 000620 0000a4 00 A 0 0 8
^^^^^^
[...]
|> [hpadl731] $ strip x
|> [hpadl731] $ ./x
|> Memory fault(coredump)
|> [hpadl731] $ readelf -S -I x
|>
|> There are 31 section headers, starting at offset 0x11e4:
|>
|> Section Headers:
|> [Nr] Name Type Addr Off Size ES Flg Lk Inf Al
|> [ 0] NULL 00000000 000000 000000 00 0 0 0
|> [ 1] .dynamic DYNAMIC 04000178 000178 0000b8 08 A 3 0 8
|> [ 2] .dynsym DYNSYM 04000230 000230 0001a0 10 A 3 0 8
|> [ 3] .dynstr STRTAB 040003d0 0003d0 00024a 00 A 0 0 1
|> [ 4] .hash HASH 04000620 00061c 0000a4 04 A 2 0 8
^^^^^^
This seems to be the culprit.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
next prev parent reply other threads:[~2002-06-21 16:28 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-21 8:26 Steve Ellcey
2002-06-21 9:28 ` Andreas Schwab [this message]
2002-06-22 4:56 ` Alan Modra
2002-06-22 12:23 ` Andreas Schwab
2002-06-22 22:05 ` Alan Modra
2002-06-22 22:11 ` Alan Modra
-- strict thread matches above, loose matches on Subject: below --
2002-07-23 9:13 Steve Ellcey
2002-07-23 9:43 ` Daniel Jacobowitz
2002-07-23 11:00 ` Nick Clifton
2002-07-16 16:04 Reva Cuthbertson
[not found] ` <m3vg7cvz6j.fsf@north-pole.nickc.cambridge.redhat.com>
[not found] ` <3D3C766C.91969D78@cup.hp.com>
2002-07-23 5:13 ` Nick Clifton
2002-06-28 16:06 Reva Cuthbertson
2002-06-29 10:30 ` Andreas Schwab
2002-07-08 14:16 ` Reva Cuthbertson
2002-06-24 8:49 Steve Ellcey
2002-06-20 10:14 Steve Ellcey
2002-06-20 20:54 ` Alan Modra
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=jek7osfvfp.fsf@sykes.suse.de \
--to=schwab@suse.de \
--cc=amodra@bigpond.net.au \
--cc=binutils@sources.redhat.com \
--cc=sje@cup.hp.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).