diff options
author | rofl0r <rofl0r@users.noreply.github.com> | 2022-07-22 02:00:15 +0300 |
---|---|---|
committer | rofl0r <rofl0r@users.noreply.github.com> | 2022-07-22 02:04:03 +0300 |
commit | 060801d8c8613692469c8d1ccfc2598fb8a2992a (patch) | |
tree | 8836ff3aeccf786308530d740eda63d8fa8e7500 | |
parent | 09142579c5711c57e7f80986f22b388185cb0585 (diff) |
according to research done by @malash, the proxychains4 binary
itself isn't allowed to use system-internal arm64e mode; but
it's possible to add it as a 3rd architecture to the shared
library (.dylib), and then even inject it into system binaries
like /usr/bin/curl, which didn't work since the introduction
of SIP.
therefore, we now create the dylib with all 3 archs, but the
launcher only with arm64 and x86_64.
closes #453
-rw-r--r-- | Makefile | 4 | ||||
-rwxr-xr-x | configure | 8 |
2 files changed, 7 insertions, 5 deletions
@@ -97,10 +97,10 @@ $(LDSO_PATHNAME): $(LOBJS) $(USER_LDFLAGS) -shared -o $@ $^ $(SOCKET_LIBS) $(PXCHAINS): $(OBJS) - $(CC) $^ $(FAT_LDFLAGS) $(USER_LDFLAGS) $(LIBDL) -o $@ + $(CC) $^ $(FAT_BIN_LDFLAGS) $(USER_LDFLAGS) $(LIBDL) -o $@ $(PXCHAINS_D): $(DOBJS) - $(CC) $^ $(FAT_LDFLAGS) $(USER_LDFLAGS) -o $@ + $(CC) $^ $(FAT_BIN_LDFLAGS) $(USER_LDFLAGS) -o $@ .PHONY: all clean install install-config install-libs install-tools install-zsh-completion @@ -280,11 +280,13 @@ if ismac ; then echo "Configuring a fat binary for i386 and x86_64" echo "MAC_CFLAGS+=-arch i386 -arch x86_64">>config.mak echo "FAT_LDFLAGS=-arch i386 -arch x86_64">>config.mak + echo "FAT_BIN_LDFLAGS=-arch i386 -arch x86_64">>config.mak fi if [ "$fat_binary_m1" = 1 ] ; then - echo "Configuring a fat binary for arm64e and x86_64" - echo "MAC_CFLAGS+=-arch arm64e -arch x86_64">>config.mak - echo "FAT_LDFLAGS=-arch arm64e -arch x86_64">>config.mak + echo "Configuring a fat binary for arm64[e] and x86_64" + echo "MAC_CFLAGS+=-arch arm64 -arch arm64e -arch x86_64">>config.mak + echo "FAT_LDFLAGS=-arch arm64 -arch arm64e -arch x86_64">>config.mak + echo "FAT_BIN_LDFLAGS=-arch arm64 -arch x86_64">>config.mak fi elif isbsd ; then echo LIBDL=>>config.mak |