Fix libafl_libfuzzer's compatibility with LLVM 14 #2136
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TL;DR: The LLVM 14 bfd gold linker plugin, which is used by
nm
is not compatible with libraries compiled with LLVM 18 (default since a few days in Rust)I was confused by this issue and wanted to dig deeper why with LLVM 14 installed, compilation fails.
It turned out that the package
llvm-14-linker-tools
installs a bfd plugin at/usr/lib/bfd-plugins/LLVMgold-14.so
which is used by the systemnm
tool.The
nm
tool is used to relocate the symbols under a namespace. If the LLVM 14 bfd plugin is installed then the relocations miss the following relocations:I also noticed now this output of nm:
Is there a reason why we are not using the Rust supplied
nm
version?