aboutsummaryrefslogtreecommitdiff
path: root/binutils/readelf.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2018-04-12 15:41:07 +0100
committerNick Clifton <nickc@redhat.com>2018-04-12 15:41:07 +0100
commit86c6c6df007cee29f4a723df1a6af1889183fb2e (patch)
tree01f7663723e59da0ecd26773bae7f5e73f98ac7b /binutils/readelf.c
parent67f846b59b32f3d704c601669409c2584383fea9 (diff)
downloadgdb-86c6c6df007cee29f4a723df1a6af1889183fb2e.zip
gdb-86c6c6df007cee29f4a723df1a6af1889183fb2e.tar.gz
gdb-86c6c6df007cee29f4a723df1a6af1889183fb2e.tar.bz2
Fix the loading of the dynamic string table in a file without sections.
PR 23050 * readelf.c (process_dynamic_section): Correct dynamic string table size calculation.
Diffstat (limited to 'binutils/readelf.c')
-rw-r--r--binutils/readelf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 166dd23..4b6f9fc 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -9639,7 +9639,7 @@ process_dynamic_section (Filedata * filedata)
if (archive_file_offset != 0)
str_tab_len = archive_file_size - offset;
else
- str_tab_len = filedata->file_size;
+ str_tab_len = filedata->file_size - offset;
if (str_tab_len < 1)
{