Copy all sections as strings are otherwise missing.

This commit is contained in:
Andy Nguyen 2021-10-25 10:47:37 +02:00
parent d48b3df31c
commit 3f94ab0869

View File

@ -2,7 +2,6 @@ TARGET = payload
OBJS = start.o payload.o
CC = gcc
AS = as
OBJCOPY = objcopy
CFLAGS = -Os -fno-stack-protector
LDFLAGS = -T linker.x -nostdlib -nostartfiles
@ -10,7 +9,7 @@ LDFLAGS = -T linker.x -nostdlib -nostartfiles
all: $(TARGET).bin
%.bin: %.elf
$(OBJCOPY) -S -j .text -j .data -j .rodata -j .bss -O binary $^ $@
$(OBJCOPY) -S -O binary $^ $@
$(TARGET).elf: $(OBJS)
$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)