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] bfd: Add support for more than one plugin in lib/bfd-plugins


On 2014.09.23 at 23:31 +0930, Alan Modra wrote:
> On Tue, Sep 23, 2014 at 03:07:29PM +0200, Markus Trippelsdorf wrote:
> > On 2014.09.23 at 21:38 +0930, Alan Modra wrote:
> > > A perhaps more serious issue is that after your patch we'll call
> > > dlopen() and onload() on each lto input object file.  Before, we
> > > dlopen a plugin and call onload just once.
> > 
> > That is the price to pay for handling mixed (LLVM/GCC/native) archives.
> 
> No, you can still get by with one dlopen per plugin without
> complicating matters too much.  The idea is to load all the plugins
> the first time you need any, storing their claim_file function
> addresses in a dynamically allocated array or linked list.  Then for
> each object file, iterate over these claim_file functions until you
> find one that claims the object.

All this is already handled by Linux in the background. Just look at
strace output. So I think implementing the above is not necessary.

-- 
Markus


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