aboutsummaryrefslogtreecommitdiff
path: root/binutils/readelf.c
diff options
context:
space:
mode:
Diffstat (limited to 'binutils/readelf.c')
-rw-r--r--binutils/readelf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 80af9a2..0ea8273 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -9969,11 +9969,13 @@ get_num_dynamic_syms (Filedata * filedata)
nbuckets = byte_get (nb, hash_ent_size);
nchains = byte_get (nc, hash_ent_size);
- num_of_syms = nchains;
buckets = get_dynamic_data (filedata, nbuckets, hash_ent_size);
chains = get_dynamic_data (filedata, nchains, hash_ent_size);
+ if (buckets != NULL && chains != NULL)
+ num_of_syms = nchains;
+
no_hash:
if (num_of_syms == 0)
{