[llvm-dev] llvm-link has no --allow-multiple-definition

Marc via llvm-dev llvm-dev at lists.llvm.org
Sun Mar 8 10:00:33 PDT 2020


I am developing an LTO instrumentation of programs for fuzzing (for
afl++) and I run into the following problem:

a lot of open source program have multiple definitons of the same
functions. In normal compile mode this is not a problem, however with
LTO this only works with the linker option:

Now to be able to instrument (it is an "opt" pass") at link time I need
to merge all bitcode files together, and this works great - unless I run
into this error when I link them to llvm-link:

error: Linking globals named 'process_arg': symbol multiply defined!

(this is for the bogofilter tools, but happens with other open source
program too).

My issue is that neither is --allow-multiple-definition an llvm-link
command line option, nor can I find an equivalent from the --help output.

is there a plan to add this (IMHO) important feature? Thank you!


Marc Heuse

PGP: AF3D 1D4C D810 F0BB 977D  3807 C7EE D0A0 6BE9 F573

More information about the llvm-dev mailing list