This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [patch bfd]: Fix boostrap of binutils with gcc 4.8
Ping
2012/10/10 Kai Tietz <ktietz70@googlemail.com>:
> Hi,
>
> this patch fixes a hidden bug which got detected by new 4.8
> warning-check about sizeof-argument (really useful one - much kudos!)
>
> ChangeLog
>
> 2012-10-10 Kai Tietz
>
> * elf32-xtensa.c (clear_section_cache): Zero
> complete memory-region.
> (section_cache_section): Likewise.
>
> Tested for x86_64-unknown-linux-gnu host. Ok for apply?
>
> Regards,
> Kai
>
> Index: elf32-xtensa.c
> ===================================================================
> RCS file: /cvs/src/src/bfd/elf32-xtensa.c,v
> retrieving revision 1.135
> diff -p -u -3 -r1.135 elf32-xtensa.c
> --- elf32-xtensa.c 2 Sep 2012 12:17:26 -0000 1.135
> +++ elf32-xtensa.c 10 Oct 2012 14:36:08 -0000
> @@ -6075,7 +6075,7 @@ clear_section_cache (section_cache_t *se
> release_internal_relocs (sec_cache->sec, sec_cache->relocs);
> if (sec_cache->ptbl)
> free (sec_cache->ptbl);
> - memset (sec_cache, 0, sizeof (sec_cache));
> + memset (sec_cache, 0, sizeof (section_cache_t));
> }
> }
>
> @@ -6117,7 +6117,7 @@ section_cache_section (section_cache_t *
>
> /* Fill in the new section cache. */
> clear_section_cache (sec_cache);
> - memset (sec_cache, 0, sizeof (sec_cache));
> + memset (sec_cache, 0, sizeof (section_cache_t));
>
> sec_cache->sec = sec;
> sec_cache->contents = contents;
--
| (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination