Skip to content

Commit 385b8b3

Browse files
committed
remove the hack
1 parent d670a10 commit 385b8b3

File tree

3 files changed

+3
-32
lines changed

3 files changed

+3
-32
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ endif
5656
then \
5757
$(CC) $(CFLAGS) $(DIR_CFLAGS_$(@D)) $^ -o $@ $(LDLIBS); \
5858
else \
59-
$(CC) $(CFLAGS) $(DIR_CFLAGS_$(@D)) $^ -o $@ $(LDLIBS) -Xlinker -rpath=$$(realpath glibc-all-in-one/libs/$$version*) -Xlinker -I$$(realpath glibc-all-in-one/libs/$$version*/ld-linux-x86-64.so.2) -Xlinker $$(realpath glibc-all-in-one/libs/$$version*/libc.so.6) -Xlinker $$(realpath glibc-all-in-one/libs/$$version*/libdl.so.2) -include ./utils/wrapper.h -Wl,--wrap=__libc_start_main -Wl,--wrap=dlsym; \
59+
$(CC) $(CFLAGS) $(DIR_CFLAGS_$(@D)) $^ -o $@ $(LDLIBS) -Xlinker -rpath=$$(echo glibc-all-in-one/libs/$$version*) -Xlinker -I$$(echo glibc-all-in-one/libs/$$version*/ld-linux-x86-64.so.2) -Xlinker $$(echo glibc-all-in-one/libs/$$version*/libc.so.6) -Xlinker $$(echo glibc-all-in-one/libs/$$version*/libdl.so.2); \
6060
fi
6161

6262
all: $(BINS)

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ Notice that this will link the binaries with your system libc. If you want to pl
7171
You will encounter symbol versioning issues (see [this](https://github.com/shellphish/how2heap/issues/169)) if you try to `LD_PRELOAD` libcs to a binary that's compiled on your host machine.
7272
We have two ways to bypass it.
7373

74-
### Method 1: use linker magic (Experimental)
75-
This one uses some linker magic to tell the compiler that it needs to link with a libc that may not be the latest.
74+
### Method 1: link against older libc
75+
This one tells linker to link the target binary with the target libc.
7676
```shell
7777
git clone https://github.com/shellphish/how2heap
7878
cd how2heap

utils/wrapper.h

-29
This file was deleted.

0 commit comments

Comments
 (0)