This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gold patch committed: Remove assertion


This patch to gold removes an incorrect assertion.  The assertion was
intended to ensure that the linker read the local symbols when
processing an object with a .eh_frame section, as the local symbols are
required for .eh_frame merging.  However, this test fails if the object
has no symbols at all.  Since that is a valid input file, the linker
should not assert.  The problem is easy to fix by removing the
assertion.  Committed to mainline.

Ian


2011-09-12  Ian Lance Taylor  <iant@google.com>

	* object.cc (Sized_relobj_file::do_layout): Remove assertion which
	triggered if object has no symbols.


Index: object.cc
===================================================================
RCS file: /cvs/src/src/gold/object.cc,v
retrieving revision 1.147
diff -u -p -r1.147 object.cc
--- object.cc	1 Aug 2011 18:25:21 -0000	1.147
+++ object.cc	12 Sep 2011 17:34:11 -0000
@@ -1582,8 +1582,6 @@ Sized_relobj_file<size, big_endian>::do_
        p != eh_frame_sections.end();
        ++p)
     {
-      gold_assert(external_symbols_offset != 0);
-
       unsigned int i = *p;
       const unsigned char* pshdr;
       pshdr = section_headers_data + i * This::shdr_size;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]