This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
[binutils-gdb] Prevent a bigus warning from readelf about a gdb-index table being too big.
- From: Nick Clifton <nickc at sourceware dot org>
- To: bfd-cvs at sourceware dot org
- Date: 10 Apr 2017 15:27:49 -0000
- Subject: [binutils-gdb] Prevent a bigus warning from readelf about a gdb-index table being too big.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=28d909e539567ab5ecd2bc20680e933869fdf889
commit 28d909e539567ab5ecd2bc20680e933869fdf889
Author: John Delsignor <john.delsignore@roguewave.com>
Date: Mon Apr 10 16:27:05 2017 +0100
Prevent a bigus warning from readelf about a gdb-index table being too big.
PR binutils/21319
* dwarf.c (display_gdb_index): Correct test for a corrupt address
table size.
Diff:
---
binutils/ChangeLog | 6 ++++++
binutils/dwarf.c | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 5323e6a..1c8d1aa 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,9 @@
+2017-04-10 John Delsignor <john.delsignore@roguewave.com>
+
+ PR binutils/21319
+ * dwarf.c (display_gdb_index): Correct test for a corrupt address
+ table size.
+
2017-04-05 Jiong Wang <jiong.wang@arm.com>
* objcopy.c (struct redefine_node): Delete the field "next".
diff --git a/binutils/dwarf.c b/binutils/dwarf.c
index fdfbc16..559d6f8 100644
--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -7670,7 +7670,7 @@ display_gdb_index (struct dwarf_section *section,
symbol_table = start + symbol_table_offset;
constant_pool = start + constant_pool_offset;
- if (address_table + address_table_size * (2 + 8 + 4) > section->start + section->size)
+ if (address_table + address_table_size > section->start + section->size)
{
warn (_("Address table extends beyond end of section.\n"));
return 0;