bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/30577] No way to prevent BFD plugin auto-loading


From: nickc at redhat dot com
Subject: [Bug binutils/30577] No way to prevent BFD plugin auto-loading
Date: Wed, 28 Jun 2023 11:14:29 +0000

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

Nick Clifton <nickc at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at sourceware dot org   |nickc at redhat dot com
                 CC|                            |nickc at redhat dot com
             Status|NEW                         |ASSIGNED

--- Comment #1 from Nick Clifton <nickc at redhat dot com> ---
(In reply to Richard Biener from comment #0)
Hi Richard,

> There is no documented way to disable plugin auto-loading from BFD for tools
> like NM and AR but this also affects LD.

True...

> By inspecting the source I can see that for AR at least --plugin="" works

This should also work for NM, but not for LD.

> but there is no --no-plugin 

I am tempted to suggest that we document --plugin="" as doing this,
and make sure that LD supports it as well.  That would mean the least
disruption to the sources.  (Except see below for a different approach...)

> or any way to for example override the
> search directory in the environment.

Again true.  I dislike having a hard-coded directory in the sources,
so having a way to set it dynamically would be good.  I am very wary 
of using an environment variable to do this however as it makes
debugging plugin problems very hard.  Very few bug reports include
a list of environment variables, and it is easy to imagine that a
user unfamiliar with the binutils plugin code would not even realise
that the problem might be due to a plugin being loaded from an 
unexpected location because of an environment variable.

So instead I would suggest adding a --plugin-dir=<DIR> option which 
could be used to override the builtin default.  It could even support
--plugin-dir=NUL to stop any auto-loading and --plugin-dir=DEFAULT 
to reset the search directory back to the builtin default.

What do you think ?

Cheers
  Nick

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]