mirror of
https://github.com/brain-hackers/lab
synced 2025-10-15 12:48:39 +09:00
Implement memory spray
This commit is contained in:
12
x1/Makefile
12
x1/Makefile
@@ -7,7 +7,7 @@ all: return.bin mrc.bin c/main.bin
|
||||
|
||||
.PHONY:
|
||||
clean:
|
||||
@rm -f *.bin */*.bin
|
||||
@rm -f *.bin spray/*.bin c/*.bin
|
||||
|
||||
%.bin: %.S
|
||||
@$(AS) $<
|
||||
@@ -17,4 +17,12 @@ clean:
|
||||
c/main.bin:
|
||||
@$(CC) -nostdlib -static -fPIC -mcpu=cortex-a7 c/start.S c/main.c
|
||||
@./extract.py a.out $@
|
||||
#@rm -f a.out
|
||||
@rm -f a.out
|
||||
|
||||
spray/main.bin:
|
||||
@$(AS) spray/top.S
|
||||
@./extract.py -p a.out spray/top.bin
|
||||
@$(AS) spray/bottom.S
|
||||
@./extract.py -p a.out spray/bottom.bin
|
||||
@./append_nop.py 15728640 spray/top.bin spray/bottom.bin spray/main.bin
|
||||
@rm -f a.out
|
||||
|
Reference in New Issue
Block a user