This is the mail archive of the binutils-cvs@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb/binutils-2_26-branch] Invalid read in _bfd_elf_get_symbol_version_string


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=73590ef79194e7e588d4dd1281d0b451fe485fec

commit 73590ef79194e7e588d4dd1281d0b451fe485fec
Author: Alan Modra <amodra@gmail.com>
Date:   Tue Jun 28 18:59:33 2016 +0930

    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.

Diff:
---
 binutils/ChangeLog | 6 ++++++
 binutils/objdump.c | 3 ++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 81cb7bd..2695a55 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-13  Alan Modra  <amodra@gmail.com>
 
 	* objcopy.c (copy_main): Init newsym->othersym.
diff --git a/binutils/objdump.c b/binutils/objdump.c
index ba9cd7c..c85b023 100644
--- a/binutils/objdump.c
+++ b/binutils/objdump.c
@@ -809,7 +809,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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]