This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Invalid read in _bfd_elf_get_symbol_version_string
- From: Alan Modra <amodra at gmail dot com>
- To: binutils at sourceware dot org
- Date: Tue, 28 Jun 2016 19:10:29 +0930
- Subject: Invalid read in _bfd_elf_get_symbol_version_string
- Authentication-results: sourceware.org; auth=none
PR 20304
* objdump.c (objdump_print_symname): Don't attempt to retrieve
version info from synthetic symbols.
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;
--
Alan Modra
Australia Development Lab, IBM