writeups/2021/corctf/ret2cds/exploit/Makefile

17 lines
303 B
Makefile

.PHONY: all clean copy
CC=gcc
OBJCOPY=objcopy
all: implant.bin
clean:
$(RM) *.bin *.elf
implant.bin: implant.elf
$(OBJCOPY) -O binary $< $@
implant.elf: stage2.c stage2.ld
$(CC) -nostdlib -nodefaultlibs -nostdinc -T stage2.ld -fpic -fno-stack-protector \
-Os -std=gnu11 -Wall -Wextra -o $@ $<