aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorTristan Gingold <gingold@adacore.com>2011-06-09 15:29:05 +0000
committerTristan Gingold <gingold@adacore.com>2011-06-09 15:29:05 +0000
commite682d13b0a33c653960e7ae1dca56cd8337c44b4 (patch)
treed34c758e685580e487f2d414e9b10636008a2ae1 /binutils
parent94e4274dc0e36cc3c3927e09f7e8ca41b39a8dd7 (diff)
downloadgdb-e682d13b0a33c653960e7ae1dca56cd8337c44b4.zip
gdb-e682d13b0a33c653960e7ae1dca56cd8337c44b4.tar.gz
gdb-e682d13b0a33c653960e7ae1dca56cd8337c44b4.tar.bz2
2011-06-09 Tristan Gingold <gingold@adacore.com>
* od-xcoff.c (xcoff32_read_symbols): Allow missing string table length.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog5
-rw-r--r--binutils/od-xcoff.c9
2 files changed, 8 insertions, 6 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 0de33e5..918c7e1 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,8 @@
+2011-06-09 Tristan Gingold <gingold@adacore.com>
+
+ * od-xcoff.c (xcoff32_read_symbols): Allow missing string table
+ length.
+
2011-06-08 Nick Clifton <nickc@redhat.com>
PR binutils/12855
diff --git a/binutils/od-xcoff.c b/binutils/od-xcoff.c
index 47d0248..5b8b589 100644
--- a/binutils/od-xcoff.c
+++ b/binutils/od-xcoff.c
@@ -639,17 +639,14 @@ xcoff32_read_symbols (bfd *abfd, struct xcoff_dump *data)
+ data->nsyms * (unsigned)sizeof (struct external_syment);
/* Read string table. */
- if (bfd_seek (abfd, stptr, SEEK_SET) != 0)
+ if (bfd_seek (abfd, stptr, SEEK_SET) != 0
+ || bfd_bread (&stsz_arr, sizeof (stsz_arr), abfd) != sizeof (stsz_arr))
{
+ non_fatal (_("cannot read strings table length"));
data->strings_size = 0;
}
else
{
- if (bfd_bread (&stsz_arr, sizeof (stsz_arr), abfd) != sizeof (stsz_arr))
- {
- non_fatal (_("cannot read strings table len"));
- return;
- }
data->strings_size = bfd_h_get_32 (abfd, stsz_arr);
if (data->strings_size > sizeof (stsz_arr))
{