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 binutils/13278: --plugin doesn't work on archive


On Mon, Oct 10, 2011 at 12:57:07PM -0700, H.J. Lu wrote:
> --- a/bfd/format.c
> +++ b/bfd/format.c
> @@ -322,6 +322,16 @@ bfd_check_format_matches (bfd *abfd, bfd_format format, char ***matching)
>  
>        if (matching_vector)
>  	free (matching_vector);
> +#if BFD_SUPPORTS_PLUGINS
> +      if (abfd->format == bfd_archive)
> +	{
> +	  /* Don't change the plugin type on archive to the target type of
> +	     the first archive member.  */
> +	  extern const bfd_target plugin_vec;
> +	  if (save_targ == &plugin_vec)
> +	    abfd->xvec = save_targ;
> +	}
> +#endif
>        return TRUE;			/* File position has moved, BTW.  */
>      }

This looks quite dodgy to me.  Better to fix the problem in
bfd_generic_archive_p I think.

-- 
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]