From: Ian Lance Taylor Date: Wed, 23 Apr 2008 17:40:19 +0000 (+0000) Subject: * object.cc (Sized_relobj::include_section_group): Check for X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=554387026911a74af6e23cd8791d16ce5a1a0070;p=binutils-gdb.git * object.cc (Sized_relobj::include_section_group): Check for invalid section group. --- diff --git a/gold/ChangeLog b/gold/ChangeLog index 3e3f4fd511d..b73da9b4bf1 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,5 +1,8 @@ 2008-04-23 Ian Lance Taylor + * object.cc (Sized_relobj::include_section_group): Check for + invalid section group. + * object.cc (make_elf_object): Correct test for 64-bit ELF file header size. diff --git a/gold/object.cc b/gold/object.cc index 9cfd8867d40..1672225d029 100644 --- a/gold/object.cc +++ b/gold/object.cc @@ -609,6 +609,13 @@ Sized_relobj::include_section_group( secnum, index); continue; } + + // Check for an earlier section number, since we're going to get + // it wrong--we may have already decided to include the section. + if (secnum < index) + this->error(_("invalid section group %u refers to earlier section %u"), + index, secnum); + (*omit)[secnum] = true; }