fix issue of jumping to address 0
This commit is contained in:
@@ -16,8 +16,8 @@ LDFLAGS = -T test.ld
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) $^ -o $@
|
||||
|
||||
%.elf: %.o
|
||||
$(LD) $(LDFLAGS) $^ -o $@
|
||||
%.elf: %.o %.ld
|
||||
$(LD) $(LDFLAGS) $< -o $@
|
||||
|
||||
text.hex: test.elf
|
||||
riscv64-linux-gnu-objdump -s $^ | sed -n '/.text/,$$p' | tail -n+2 | sed -n '/.data/,$$!p' | cut -f3-6 -d ' ' | sed -e 's/ /\n/g' | sed 's/^\(..\)\(..\)\(..\)\(..\)/\4\3\2\1/' > $@
|
||||
|
Reference in New Issue
Block a user