AFLplusplus / AFLplusplus

The fuzzer afl++ is afl with community patches, qemu 5.1 upgrade, collision-free coverage, enhanced laf-intel & redqueen, AFLfast++ power schedules, MOpt mutators, unicorn_mode, and a lot more!

Home Page:https://aflplus.plus

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

On macOS, `ld`'s `rpath` paramater does not want an `=`

seanm opened this issue · comments

I continue to struggle to get a working afl++ on macOS...

Perhaps it's my hack for #1865 or #2000 but I find myself in a situation where trying to build a trivial Objective-C++ executable fails to link:

% afl-clang-fast++ test.m -framework Cocoa
afl-cc++4.20a by Michal Zalewski, Laszlo Szekeres, Marc Heuse - mode: LLVM-PCGUARD
SanitizerCoveragePCGUARD++4.20a
[+] Instrumented 1 locations with no collisions (non-hardened mode) of which are 0 handled and 0 unhandled selects.
ld: unknown options: -rpath=/opt/homebrew/Cellar/llvm/17.0.6_1/lib
clang++: error: linker command failed with exit code 1 (use -v to see invocation)

Looking at the ld man page on macOS, it seems that it should be specified as -rpath /opt/homebrew/Cellar/llvm/17.0.6_1/lib (without the equals sign).

This seems to be a difference between Mac & Linux, I've found a few other general discussions of it, ex:

https://forum.dlang.org/thread/svgizdajgmwaqzfuvfyk@forum.dlang.org

conan-io/conan#7715

In afl++, this seems to have been added here: 572a08f

I will make a PR with a possible fix.

On Linux, it works with space, comma and equal sign.
if this continues to make a problem we could switch to a comma.
thanks.