This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PR ld/21884: Check ELF section header only for ELF output


On Wed, Aug 02, 2017 at 04:53:51AM -0700, H.J. Lu wrote:
> --- a/ld/emultempl/elf32.em
> +++ b/ld/emultempl/elf32.em
> @@ -2136,7 +2136,8 @@ gld${EMULATION_NAME}_place_orphan (asection *s,
>      }
>  
>    /* Look through the script to see where to place this section.  */
> -  if (constraint == 0)
> +  if (constraint == 0
> +      && link_info.output_bfd->xvec->flavour == bfd_target_elf_flavour)
>      for (os = lang_output_section_find (secname);
>  	 os != NULL;
>  	 os = next_matching_output_section_statement (os, 0))

This doesn't look to be the right place to me.  I think the loop
should run but the ELF specific tests be omitted when either input or
output is non-ELF.

Also, there is a similar problem with the .mbind code just a little
earlier.

-- 
Alan Modra
Australia Development Lab, IBM


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]