This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] Add plugin interface to LD [2/4] Claim files and add symbols.
- From: Dave Korn <dave dot korn dot cygwin at gmail dot com>
- To: "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Fri, 24 Sep 2010 02:46:14 +0100
- Subject: Re: [PATCH] Add plugin interface to LD [2/4] Claim files and add symbols.
- References: <4C9AE5CA.80707@gmail.com> <4C9AE63D.3030706@gmail.com>
On 23/09/2010 06:31, Dave Korn wrote:
More self-review:
> @@ -290,6 +301,59 @@ ldfile_try_open_bfd (const char *attempt,
> }
> }
>
> +#ifdef ENABLE_PLUGINS
> + /* If plugins are active, they get first chance to claim
> + any successfully-opened input file. We skip archives
> + here; the plugin wants us to offer it the individual
> + members when we enumerate them, not the whole file. We
> + also ignore corefiles, because that's just weird. It is
> + a needed side-effect of calling bfd_check_format with
> + bfd_object that it sets the bfd's arch and mach, which
> + will be needed when and if we want to bfd_create a new
> + one using this one as a template. */
> + int fildes = bfd_check_format (entry->the_bfd, bfd_object)
> + ? open (attempt, O_RDONLY
Oops. C99-style definition mingling amongst code; will have to refactor it
before commit.
cheers,
DaveK