This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Invalid read in _bfd_elf_get_symbol_version_string
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Alan Modra <amodra at gmail dot com>, Tristan Gingold <gingold at adacore dot com>
- Cc: Binutils <binutils at sourceware dot org>
- Date: Tue, 28 Jun 2016 05:20:23 -0700
- Subject: Re: Invalid read in _bfd_elf_get_symbol_version_string
- Authentication-results: sourceware.org; auth=none
- References: <20160628094029 dot GG3665 at bubble dot grove dot modra dot org>
On Tue, Jun 28, 2016 at 2:40 AM, Alan Modra <amodra@gmail.com> wrote:
> 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;
>
This should be backported to 2.26 branch.
--
H.J.