add CFI variant for gcc
@@ -1050,6 +1050,12 @@ static void edit_params(u32 argc, char **argv, char **envp) {
if (getenv("AFL_USE_CFISAN")) {
+ if (compiler_mode == GCC_PLUGIN || compiler_mode == GCC) {
+
+ cc_params[cc_par_cnt++] = "-fcf-protection";
+
+ } else {
+
if (!lto_mode) {
uint32_t i = 0, found = 0;
@@ -1064,6 +1070,8 @@ static void edit_params(u32 argc, char **argv, char **envp) {
}
+ }
+
if (!getenv("AFL_DONT_OPTIMIZE")) {
cc_params[cc_par_cnt++] = "-g";
