/..

#CONTENT

#TOP

Makefile
MAKEFILE
CFLAGS=-Wl,-rpath,. -Wl,--dynamic-linker=/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2

.PHONY: solve

solve:
	python3 generate.py RELACOUNT=512
	gcc whatever.c -o libwhatever.so -shared -fPIC -fPIE
	gcc solve.c -o solve.elf -lwhatever -L. -pie -fPIE -Wl,-e,main -nostdlib -nostartfiles -masm=intel $(CFLAGS)
	patchelf --add-needed /proc/self/exe solve.elf
	patchelf --remove-needed libwhatever.so solve.elf
	python3 patch.py