Skip to content

Commit

Permalink
Fix linux noexec stack wtf with -Wl,-z,noexecstack
Browse files Browse the repository at this point in the history
  • Loading branch information
radare authored and trufae committed Apr 2, 2024
1 parent 4034f0d commit f7c1646
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ endif

ifeq ($(frida_os),linux)
HAVE_MUSL=$(shell (grep -q musl /bin/ls && test -x /lib/ld-musl*) && echo 1 || echo 0)
R2FRIDA_COMPILE_FLAGS=-Wl,-z,noexecstack
else
R2FRIDA_COMPILE_FLAGS=
HAVE_MUSL=0
endif

Expand Down Expand Up @@ -373,7 +375,7 @@ frida-sdk: ext/frida-$(frida_os)-$(frida_version)
cd ext && ln -fs frida-$(frida_os)-$(frida_version) frida

src/r2frida-compile: src/r2frida-compile.c
$(CC) -g src/r2frida-compile.c $(FRIDA_CFLAGS) \
$(CC) -g src/r2frida-compile.c $(FRIDA_CFLAGS) $(R2FRIDA_COMPILE_FLAGS) \
$(shell pkg-config --cflags --libs r_util) $(FRIDA_LIBS) \
$(CFLAGS) $(LDFLAGS) -pthread -Iext/frida -o $@

Expand Down

0 comments on commit f7c1646

Please sign in to comment.