about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJesse Schwartzentruber <truber@mozilla.com>2024-04-17 14:40:41 -0400
committerJesse Schwartzentruber <truber@mozilla.com>2024-04-17 14:40:41 -0400
commit58206a3180479416e14ea324607be71ee69caa6f (patch)
treefb2e7eee17c44d365fe067ae6715e2c6f8e0f976
parentf138ab8ac682caa3ecec1773ee4e7fd0aac12f79 (diff)
downloadafl++-58206a3180479416e14ea324607be71ee69caa6f.tar.gz
Set explicit visibility on shared memory variables.
-rw-r--r--src/afl-cc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/afl-cc.c b/src/afl-cc.c
index dd4fb4ea..57089ae0 100644
--- a/src/afl-cc.c
+++ b/src/afl-cc.c
@@ -1591,8 +1591,10 @@ void add_defs_persistent_mode(aflcc_state_t *aflcc) {
   insert_param(aflcc,
                "-D__AFL_FUZZ_INIT()="
                "int __afl_sharedmem_fuzzing = 1;"
-               "extern unsigned int *__afl_fuzz_len;"
-               "extern unsigned char *__afl_fuzz_ptr;"
+               "extern __attribute__((visibility(\"default\"))) "
+               "unsigned int *__afl_fuzz_len;"
+               "extern __attribute__((visibility(\"default\"))) "
+               "unsigned char *__afl_fuzz_ptr;"
                "unsigned char __afl_fuzz_alt[1048576];"
                "unsigned char *__afl_fuzz_alt_ptr = __afl_fuzz_alt;");