diff options
| author | WorksButNotTested <62701594+WorksButNotTested@users.noreply.github.com> | 2021-07-02 08:44:53 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-02 09:44:53 +0200 |
| commit | a8529de59247a8bf1e9c1591c0db306ccbcf1d49 (patch) | |
| tree | ad23054ba30c47a2b22a464f10c0ed33a1f3f180 /frida_mode/GNUmakefile | |
| parent | a6cf9bb336cc3e166469d6eed206a2b6fa9c994a (diff) | |
| download | afl++-a8529de59247a8bf1e9c1591c0db306ccbcf1d49.tar.gz | |
Changes to strip unused symbols from afl-frida-trace.so and hance remove v7 and its dependency on C++ (#1001)
Co-authored-by: Your Name <you@example.com>
Diffstat (limited to 'frida_mode/GNUmakefile')
| -rw-r--r-- | frida_mode/GNUmakefile | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/frida_mode/GNUmakefile b/frida_mode/GNUmakefile index f5a96501..d8206d94 100644 --- a/frida_mode/GNUmakefile +++ b/frida_mode/GNUmakefile @@ -19,13 +19,14 @@ CFLAGS+=-fPIC \ -g \ -O3 \ -funroll-loops \ + -ffunction-sections \ RT_CFLAGS:=-Wno-unused-parameter \ -Wno-sign-compare \ -Wno-unused-function \ -Wno-unused-result \ -Wno-int-to-pointer-cast \ - -Wno-pointer-sign \ + -Wno-pointer-sign LDFLAGS+=-shared \ -lpthread \ @@ -64,7 +65,10 @@ else ifdef DEBUG RT_CFLAGS:=$(RT_CFLAGS) -Wno-prio-ctor-dtor endif -LDFLAGS+=-z noexecstack +LDFLAGS+= -z noexecstack \ + -Wl,--gc-sections \ + -Wl,--exclude-libs,ALL +LDSCRIPT:=-Wl,--version-script=$(PWD)frida.map endif ifeq "$(shell uname)" "Linux" @@ -164,7 +168,7 @@ $(AFL_COMPILER_RT_OBJ): $(AFL_COMPILER_RT_SRC) $(JS_SRC): $(JS) | $(BUILD_DIR) cd $(JS_DIR) && xxd -i $(JS_NAME) $@ -$(JS_OBJ): $(JS_SRC) +$(JS_OBJ): $(JS_SRC) GNUmakefile $(CC) \ $(CFLAGS) \ -I $(ROOT)include \ @@ -197,6 +201,7 @@ $(FRIDA_TRACE): $(GUM_DEVIT_LIBRARY) $(GUM_DEVIT_HEADER) $(OBJS) $(JS_OBJ) $(AFL $(GUM_DEVIT_LIBRARY) \ $(AFL_COMPILER_RT_OBJ) \ $(LDFLAGS) \ + $(LDSCRIPT) \ -o $@ \ cp -v $(FRIDA_TRACE) $(ROOT) |
