https://sourceware.org/bugzilla/show_bug.cgi?id=23460

--- Comment #11 from Nick Clifton <nickc at redhat dot com> ---
(In reply to Evangelos Foutras from comment #10)

Hi Evangelos,

> Is it possible to avoid calling dlclose() on the plugin handle? 

I have to say that I am not really liking this idea...

> I'm asking
> because the LLVM gold plugin (LLVMgold.so) will throw the following error
> when loaded more than once:
> 
>   > CommandLine Error: Option 'asm-instrumentation' registered more than
> once!

Which seems correct to me.  Why would you want to load a plugin more than 
once ?

The most likely reason it seems to me is if the build system is quite
complicated and there are multiple places where the plugin command line
option could be enabled.  If this is the case, wouldn't it make more
sense for the tool (llvm, gcc, ld, etc) to accumulate plugin options and
eliminate duplicates ?

> In any case, I thought I'd also ask here if it might make sense to remove
> dlclose() from bfd's plugin loader.

I just do not like the idea of not tidying up after ourselves.  Mind you it is
only linker plugins that call dlclose.  Plugins for other tools (eg ar, nm,
etc) do not bother with the call.  Plus the linker only calls dlclose when it
is closing *all* plugins as part of its exit sequence.  So I am not sure if
there really is a problem (for the binutils) here.

Cheers
  Nick

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to