aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2016-06-28 18:59:33 +0930
committerAlan Modra <amodra@gmail.com>2016-06-28 19:09:10 +0930
commitf2b2af2c9f403ead49de8f0e01a9c149b0b420f9 (patch)
treea03299a7153d398bba1333a59f0de46b5c0a955e /binutils
parentdab26bf4e7c8b48e0c5ffbef1c5400807b78072c (diff)
downloadgdb-f2b2af2c9f403ead49de8f0e01a9c149b0b420f9.zip
gdb-f2b2af2c9f403ead49de8f0e01a9c149b0b420f9.tar.gz
gdb-f2b2af2c9f403ead49de8f0e01a9c149b0b420f9.tar.bz2
Invalid read in _bfd_elf_get_symbol_version_string
PR 20304 * objdump.c (objdump_print_symname): Don't attempt to retrieve version info from synthetic symbols.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog6
-rw-r--r--binutils/objdump.c3
2 files changed, 8 insertions, 1 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 4f5e225..cfea09b 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,9 @@
+2016-06-28 Alan Modra <amodra@gmail.com>
+
+ PR 20304
+ * objdump.c (objdump_print_symname): Don't attempt to retrieve
+ version info from synthetic symbols.
+
2016-06-24 Alan Modra <amodra@gmail.com>
* objcopy.c (find_section_rename): Forward declare. Remove
diff --git a/binutils/objdump.c b/binutils/objdump.c
index 174596e..bf9c592 100644
--- a/binutils/objdump.c
+++ b/binutils/objdump.c
@@ -823,7 +823,8 @@ objdump_print_symname (bfd *abfd, struct disassemble_info *inf,
name = alloc;
}
- version_string = bfd_get_symbol_version_string (abfd, sym, &hidden);
+ if ((sym->flags & BSF_SYNTHETIC) == 0)
+ version_string = bfd_get_symbol_version_string (abfd, sym, &hidden);
if (bfd_is_und_section (bfd_get_section (sym)))
hidden = TRUE;