PATCH COMMITTED: Check for invalid section group

Ian Lance Taylor iant@google.com
Wed Apr 23 19:06:00 GMT 2008


It seems to me that between 2004-04-30 and 2004-11-24 the GNU binutils
could produce invalid SHT_GROUP sections, in that the section header
did not precede the headers for the sections in the group.  There
don't seem to have been any binutils releases in that time.
Nevertheless, somebody has shown me an object file with this problem.
They don't work with gold, which for efficiency assumes it can rely on
the guarantee in the ELF ABI.

gold may need to handle this at some point.  In the meantime, and
perhaps forever, I committed this patch to give an error for this
case.

Ian


2008-04-23  Ian Lance Taylor  <iant@google.com>

	* object.cc (Sized_relobj::include_section_group): Check for
	invalid section group.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.patch
Type: text/x-patch
Size: 706 bytes
Desc: Check for invalid section group
URL: <https://sourceware.org/pipermail/binutils/attachments/20080423/9f4f2daf/attachment.bin>


More information about the Binutils mailing list