From: Christian Groessler <chris@groessler.org>
To: binutils@sources.redhat.com
Cc: chris@groessler.org
Subject: strip crashes on MSVC generated object files
Date: Fri, 18 Feb 2005 21:32:00 -0000 [thread overview]
Message-ID: <87zmy2ughj.fsf@strommasten.groessler.org> (raw)
Hi,
current CVS strip targetted for i686-mingw32 crashes when stripping
MSVC generated object files.
It happens for example when using the --strip-debug option.
I've put a demo object file on
ftp://ftp.groessler.org/pub/chris/tmp/strip-crash.zip (blavc.obj).
These MSVC object files have an additional .drectve section which
might trigger the problem.
What happens is that coffgen.c(bfd_coff_get_comdat_section) gets
called with an *ABS* section and then crashes when dereferencing
used_by_bfd (in coff_section_data).
I've attached a patch to workaround the issue, but it's probably more
curing the symptoms instead of the disease?
regards,
chris
2005-02-18 Christian Groessler <chris@groessler.org>
* coffgen.c (bfd_coff_get_comdat_section): Do not call
coff_section_data for *ABS* sections.
Index: bfd/coffgen.c
===================================================================
RCS file: /cvs/src/src/bfd/coffgen.c,v
retrieving revision 1.46
diff -p -u -r1.46 coffgen.c
--- bfd/coffgen.c 31 Jan 2005 23:13:17 -0000 1.46
+++ bfd/coffgen.c 18 Feb 2005 13:23:15 -0000
@@ -2427,6 +2427,8 @@ bfd_coff_set_symbol_class (abfd, symbol,
struct coff_comdat_info *
bfd_coff_get_comdat_section (bfd *abfd, struct bfd_section *sec)
{
+ if (strcmp (sec->name, BFD_ABS_SECTION_NAME) == 0)
+ return NULL;
if (bfd_get_flavour (abfd) == bfd_target_coff_flavour)
return coff_section_data (abfd, sec)->comdat;
else
next reply other threads:[~2005-02-18 13:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-18 21:32 Christian Groessler [this message]
2005-02-21 16:48 ` 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=87zmy2ughj.fsf@strommasten.groessler.org \
--to=chris@groessler.org \
--cc=binutils@sources.redhat.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).