diff options
author | van Hauser <vh@thc.org> | 2020-08-14 10:10:23 +0200 |
---|---|---|
committer | van Hauser <vh@thc.org> | 2020-08-14 10:10:23 +0200 |
commit | ce513c4f3e97d293e57e0ef90ec9e501871c5644 (patch) | |
tree | a7b4b82fa5b79b6f17d8b7f6a3b4923a1994ed11 /llvm_mode/afl-clang-fast.c | |
parent | ce92adcb9bcaba4894b58a26b2a10b11ef249c0a (diff) | |
download | afl++-ce513c4f3e97d293e57e0ef90ec9e501871c5644.tar.gz |
fix llvm12 -fuseld warning
Diffstat (limited to 'llvm_mode/afl-clang-fast.c')
-rw-r--r-- | llvm_mode/afl-clang-fast.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm_mode/afl-clang-fast.c b/llvm_mode/afl-clang-fast.c index 37af0dfc..6e8e4a1b 100644 --- a/llvm_mode/afl-clang-fast.c +++ b/llvm_mode/afl-clang-fast.c @@ -352,7 +352,15 @@ static void edit_params(u32 argc, char **argv, char **envp) { else setenv("AFL_LLVM_LTO_AUTODICTIONARY", "1", 1); +#ifdef AFL_CLANG_LDPATH + u8 *ld_ptr = strrchr(AFL_REAL_LD, '/'); + if (!ld_ptr) ld_ptr = "ld.lld"; + cc_params[cc_par_cnt++] = alloc_printf("-fuse-ld=%s", ld_ptr); + cc_params[cc_par_cnt++] = alloc_printf("--ld-path=%s", AFL_REAL_LD); +#else cc_params[cc_par_cnt++] = alloc_printf("-fuse-ld=%s", AFL_REAL_LD); +#endif + cc_params[cc_par_cnt++] = "-Wl,--allow-multiple-definition"; /* @@ -1013,6 +1021,8 @@ int main(int argc, char **argv, char **envp) { "\nafl-clang-lto specific environment variables:\n" "AFL_LLVM_MAP_ADDR: use a fixed coverage map address (speed), e.g. " "0x10000\n" + "AFL_LLVM_DOCUMENT_IDS: write all edge IDs and the corresponding " + "functions they are in into this file\n" "AFL_LLVM_LTO_DONTWRITEID: don't write the highest ID used to a " "global var\n" "AFL_LLVM_LTO_STARTID: from which ID to start counting from for a " |