This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PR22067, x86 check_relocs invalid read
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Alan Modra <amodra at gmail dot com>
- Cc: Binutils <binutils at sourceware dot org>
- Date: Sun, 3 Sep 2017 06:08:02 -0700
- Subject: Re: PR22067, x86 check_relocs invalid read
- Authentication-results: sourceware.org; auth=none
- References: <20170903124411.GP28143@bubble.grove.modra.org>
On Sun, Sep 3, 2017 at 5:44 AM, Alan Modra <amodra@gmail.com> wrote:
> Committed as obvious.
>
> PR 22067
> * elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
>
> diff --git a/bfd/elfxx-x86.h b/bfd/elfxx-x86.h
> index 61244f5..9c0dcbbe 100644
> --- a/bfd/elfxx-x86.h
> +++ b/bfd/elfxx-x86.h
> @@ -41,7 +41,8 @@
> #define ELIMINATE_COPY_RELOCS 1
>
> #define elf_x86_hash_table(p, id) \
> - (elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash)) == (id) \
> + (is_elf_hash_table ((p)->hash) \
> + && elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash)) == (id) \
> ? ((struct elf_x86_link_hash_table *) ((p)->hash)) : NULL)
>
> /* Is a undefined weak symbol which is resolved to 0. Reference to an
>
Do we need a similar fix for 2.29 branch?
Thanks.
--
H.J.