This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: PR binutils/13278: --plugin doesn't work on archive
- From: Alan Modra <amodra at gmail dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Tue, 11 Oct 2011 12:43:45 +1030
- Subject: Re: PATCH: PR binutils/13278: --plugin doesn't work on archive
- References: <20111010195707.GA12818@intel.com>
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