[PATCH] Convert .note.gnu.property section between ELF32 and ELF64

Alan Modra amodra@gmail.com
Thu Aug 9 03:21:00 GMT 2018


On Wed, Aug 08, 2018 at 07:24:33PM -0700, H.J. Lu wrote:
> --- a/bfd/bfd.c
> +++ b/bfd/bfd.c
> @@ -2483,6 +2483,10 @@ bfd_convert_section_size (bfd *ibfd, sec_ptr isec, bfd *obfd,
>        == get_elf_backend_data (obfd)->s->elfclass)
>      return size;
>  
> +  /* Convert GNU property size.  */
> +  if (CONST_STRNEQ (isec->name, NOTE_GNU_PROPERTY_SECTION_NAME))
> +    return _bfd_elf_convert_gnu_property_size (ibfd, obfd);
> +
>    /* Do nothing if the input section isn't a SHF_COMPRESSED section. */
>    hdr_size = bfd_get_compression_header_size (ibfd, isec);
>    if (hdr_size == 0)

I suspect this conversion shouldn't depend on the earlier
BFD_DECOMPRESS test, and similarly for convert_section_contents.
OK with that fixed.

-- 
Alan Modra
Australia Development Lab, IBM



More information about the Binutils mailing list