跟着官网安装依赖,装完gcc,clang以及llvm-ar,随后make、sudo make install
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
:~$ gcc --version gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0 Copyright (C) 2021 Free Software Foundation, Inc. This is free software; see the sourcefor copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
:~$ afl-cc -v afl-cc++4.41a by Michal Zalewski, Laszlo Szekeres, Marc Heuse - mode: LLVM-PCGUARD Ubuntu clang version 14.0.0-1ubuntu1.1 Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/lib/llvm-14/bin Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/11 Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/11 Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/11 Candidate multilib: .;@m64 Candidate multilib: 32;@m32 Candidate multilib: x32;@mx32 Selected multilib: .;@m64
编译xpdf
1 2 3 4 5 6
wget https://dl.xpdfreader.com/old/xpdf-3.02.tar.gz tar -zxvf xpdf-3.02.tar.gz cd xpdf-3.02/ CC=afl-clang-lto CXX=afl-clang-lto++ ./configure --prefix="$HOME/Desktop/AFL/Exercise1_Xpdf/xpdf-3.02/out" make -j$(nproc) make install