aboutsummaryrefslogtreecommitdiff
path: root/gold/object.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gold/object.cc')
-rw-r--r--gold/object.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/gold/object.cc b/gold/object.cc
index 9cfd886..1672225 100644
--- a/gold/object.cc
+++ b/gold/object.cc
@@ -609,6 +609,13 @@ Sized_relobj<size, big_endian>::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;
}