afl-cov
afl-cov copied to clipboard
Difficulty of Using afl-cov on Mac OS -- lacking readelf
I am using afl-cov on Mac OS. It seems that afl-cov depends on readelf, which does not exist on Mac. What would you suggest to deal with this?
$ afl-cov -d ./out --coverage-cmd "cat AFL_FILE | ./a.out" -c .
[*] Need a valid path to readelf, use --readelf-path
I was able to get afl-cov working on mac os a while ago. Make sure to specify the
--disable-gcov-check
Argument to your command.
You may run into future issues down the line, so reference my other comment if you run into other issues:
https://github.com/mrash/afl-cov/issues/31#issuecomment-402208352
Thanks. I may misunderstand the command line usage, but it is not working with --disable-gcov-check
.
$ ~/Downloads/afl-cov/afl-cov --disable-gcov-check ./a.out -d out/ --coverage-cmd "cat AFL_FILE | ./a.out" -c .
[*] Need a valid path to readelf, use --readelf-path
Above, ./a.out
refers to the binary compiled from the source code, out
is the directory where afl dumps its results.
Try manually specifying the path to lcov and genthml. If I remember correctly, the default locations are different for linux and macOS.