This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
gold patch committed: PR 6048: Check for absence of --eh-frame-hdr
- From: Ian Lance Taylor <iant at google dot com>
- To: binutils at sourceware dot org
- Date: Thu, 24 Jul 2008 14:24:56 -0700
- Subject: gold patch committed: PR 6048: Check for absence of --eh-frame-hdr
PR 6048 is about a gold crash when using gcc 2.95.3. I went ahead and
built a gcc 2.95.3, and indeed I was able to recreate the bug. The
problem turned out to be gcc 2.95.3 generates object files with
.eh_frame sections, but it does not pass --eh-frame-hdr to the
linker. I forgot to check for NULL in one case. Patch committed.
Ian
2008-07-24 Ian Lance Taylor <iant@google.com>
PR 6048
* ehframe.cc (Eh_frame::add_ehframe_input_section): Check whether
this->eh_frame_hdr_ is NULL before using it.
Index: ehframe.cc
===================================================================
RCS file: /cvs/src/src/gold/ehframe.cc,v
retrieving revision 1.13
diff -p -u -r1.13 ehframe.cc
--- ehframe.cc 19 Apr 2008 18:30:58 -0000 1.13
+++ ehframe.cc 24 Jul 2008 21:22:26 -0000
@@ -557,7 +557,8 @@ Eh_frame::add_ehframe_input_section(
reloc_type, pcontents,
contents_len, &new_cies))
{
- this->eh_frame_hdr_->found_unrecognized_eh_frame_section();
+ if (this->eh_frame_hdr_ != NULL)
+ this->eh_frame_hdr_->found_unrecognized_eh_frame_section();
for (New_cies::iterator p = new_cies.begin();
p != new_cies.end();