aboutsummaryrefslogtreecommitdiff
path: root/llvm_mode
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-04-02 14:37:28 +0200
committervan Hauser <vh@thc.org>2020-04-02 14:37:28 +0200
commit0c76d7e6211f39b3f233c70ace6fd746df30a140 (patch)
treef6561e1f25b6254230a44aa0e4a54151ff1f6333 /llvm_mode
parentc69c84da09e641ea8ab6c2eb69b67c2c120736b2 (diff)
downloadafl++-0c76d7e6211f39b3f233c70ace6fd746df30a140.tar.gz
remove maybe_linking artifacts
Diffstat (limited to 'llvm_mode')
-rw-r--r--llvm_mode/afl-clang-fast.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/llvm_mode/afl-clang-fast.c b/llvm_mode/afl-clang-fast.c
index de8d3410..5fc09252 100644
--- a/llvm_mode/afl-clang-fast.c
+++ b/llvm_mode/afl-clang-fast.c
@@ -136,7 +136,7 @@ static void find_obj(u8 *argv0) {
static void edit_params(u32 argc, char **argv, char **envp) {
- u8 fortify_set = 0, asan_set = 0, x_set = 0, maybe_linking = 1, bit_mode = 0;
+ u8 fortify_set = 0, asan_set = 0, x_set = 0, bit_mode = 0;
u8 has_llvm_config = 0;
u8 *name;
@@ -323,8 +323,6 @@ static void edit_params(u32 argc, char **argv, char **envp) {
/* Detect stray -v calls from ./configure scripts. */
- if (argc == 1 && !strcmp(argv[1], "-v")) maybe_linking = 0;
-
while (--argc) {
u8 *cur = *(++argv);
@@ -335,16 +333,11 @@ static void edit_params(u32 argc, char **argv, char **envp) {
if (!strcmp(cur, "-x")) x_set = 1;
- if (!strcmp(cur, "-c") || !strcmp(cur, "-S") || !strcmp(cur, "-E"))
- maybe_linking = 0;
-
if (!strcmp(cur, "-fsanitize=address") || !strcmp(cur, "-fsanitize=memory"))
asan_set = 1;
if (strstr(cur, "FORTIFY_SOURCE")) fortify_set = 1;
- if (!strcmp(cur, "-shared")) maybe_linking = 0;
-
if (!strcmp(cur, "-Wl,-z,defs") || !strcmp(cur, "-Wl,--no-undefined"))
continue;
@@ -498,8 +491,6 @@ static void edit_params(u32 argc, char **argv, char **envp) {
#endif /* ^__APPLE__ */
"_I(); } while (0)";
- // if (maybe_linking) {
-
if (x_set) {
cc_params[cc_par_cnt++] = "-x";
@@ -534,8 +525,6 @@ static void edit_params(u32 argc, char **argv, char **envp) {
#endif
- // }
-
cc_params[cc_par_cnt] = NULL;
}