Add x1 C example / improve extract.py to extract all sections after .text

This commit is contained in:
Takumi Sueda
2021-03-04 06:15:54 +09:00
parent beb13f7943
commit a1ff34dbca
5 changed files with 36 additions and 3 deletions

View File

@@ -1,10 +1,20 @@
CROSS_COMPILE:=arm-linux-gnueabihf-
AS:=$(CROSS_COMPILE)as
CC:=$(CROSS_COMPILE)gcc
.PHONY:
all: return.bin mrc.bin
all: return.bin mrc.bin c/main.bin
.PHONY:
clean:
@rm -f *.bin */*.bin
%.bin: %.S
@$(AS) $<
@./extract.py a.out $@
@rm -f a.out
c/main.bin:
@$(CC) -nostdlib -static -fPIC -mcpu=cortex-a7 c/start.S c/main.c
@./extract.py a.out $@
#@rm -f a.out