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: Alan Modra <amodra at gmail dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: Tristan Gingold <gingold at adacore dot com>, Binutils <binutils at sourceware dot org>
- Date: Tue, 28 Jun 2016 22:01:10 +0930
- 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> <CAMe9rOp=-OPuoCD7vO50hGp1o1h-TNT8E7xXj--_JucWQq=rBA at mail dot gmail dot com>
On Tue, Jun 28, 2016 at 05:20:23AM -0700, H.J. Lu wrote:
> 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.
Yes, done.
--
Alan Modra
Australia Development Lab, IBM