[PATCH] D75879: [lld][WIP]Enabling loading LLVM pass plugins
Marc via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 13 05:46:17 PDT 2020
vh marked an inline comment as done.
vh added inline comments.
================
Comment at: lld/tools/lld/CMakeLists.txt:11
)
+export_executable_symbols(lld)
----------------
jhenderson wrote:
> efriedma wrote:
> > MaskRay wrote:
> > > Does this CMake function enable -rdynamic (the same as -Wl,--export-dynamic)? It can make the executable much larger because all defined symbols in .symtab will end up in .dynsym and consume a lot of .dynstr space...
> > Yes. We have to expose all the LLVM symbols so that the plugin can use them (the plugin has to be using the same LLVM as lld itself). We do the same thing in clang.
> >
> > I guess we could add a CMake option to disable this, if you want a minimal config that doesn't support pass plugins. Not sure how likely it is anyone would use such an option.
> We have a policy whereby users are not allowed to inject their own custom passes into the compilation or link. The latter is currently impossible at the moment, and we'd like to keep it that way internally at least. If there is a compile-time option when building LLD to disable the plugin behaviour, it would be much appreciated by us. I don't think it matters too much from our point of view if it is off or on by default though, though we'd obviously prefer off.
I need this option for afl++ (which is included in the Debian, SuSE, Kali etc repos).
If this is made optional and off by default then some distros would have it enabled (the ones that ship afl++) and others not and that would create some confusion.
I am not aware of an lld feature that would people strongly want so they install lld (it has to be selected by hand on most distros I think) so this option might be a reason to :)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75879/new/
https://reviews.llvm.org/D75879
More information about the llvm-commits
mailing list