diff options
author | Ian Lance Taylor <ian@airs.com> | 2008-04-23 17:40:19 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 2008-04-23 17:40:19 +0000 |
commit | 554387026911a74af6e23cd8791d16ce5a1a0070 (patch) | |
tree | 88444e4783b5e2ebed088c9d9be09c96430efabd /gold/object.cc | |
parent | c165fb930adf54d39f41bf4f1da0dac30efcaa8e (diff) | |
download | gdb-554387026911a74af6e23cd8791d16ce5a1a0070.zip gdb-554387026911a74af6e23cd8791d16ce5a1a0070.tar.gz gdb-554387026911a74af6e23cd8791d16ce5a1a0070.tar.bz2 |
* object.cc (Sized_relobj::include_section_group): Check for
invalid section group.
Diffstat (limited to 'gold/object.cc')
-rw-r--r-- | gold/object.cc | 7 |
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; } |