compile cache.c -mpcrel
This commit is contained in:
@@ -99,6 +99,8 @@ $(OBJDIR)/init_fpga.o: CFLAGS += -mbitfield
|
|||||||
|
|
||||||
# compile printf pc-relative so it can be used as well before and after copy of BaS
|
# compile printf pc-relative so it can be used as well before and after copy of BaS
|
||||||
$(OBJDIR)/printf.o: CFLAGS += -mpcrel
|
$(OBJDIR)/printf.o: CFLAGS += -mpcrel
|
||||||
|
# the same for flush_and_invalidate_cache()
|
||||||
|
$(OBJDIR)/cache.c: CFLAGS += -mpcrel
|
||||||
|
|
||||||
$(OBJDIR)/%.o:$(SRCDIR)/%.c
|
$(OBJDIR)/%.o:$(SRCDIR)/%.c
|
||||||
$(CC) -c $(CFLAGS) $(INCLUDE) $< -o $@
|
$(CC) -c $(CFLAGS) $(INCLUDE) $< -o $@
|
||||||
|
|||||||
@@ -68,7 +68,6 @@ SECTIONS {
|
|||||||
objs/startcf.o(.text) /* this one is the entry point so it must be the first */
|
objs/startcf.o(.text) /* this one is the entry point so it must be the first */
|
||||||
objs/sysinit.o(.text)
|
objs/sysinit.o(.text)
|
||||||
objs/init_fpga.o(.text)
|
objs/init_fpga.o(.text)
|
||||||
objs/cache.o(.text)
|
|
||||||
#if (FORMAT == elf32-m68k)
|
#if (FORMAT == elf32-m68k)
|
||||||
*(.rodata)
|
*(.rodata)
|
||||||
*(.rodata.*)
|
*(.rodata.*)
|
||||||
@@ -85,6 +84,8 @@ SECTIONS {
|
|||||||
objs/printf_helper.o(.text)
|
objs/printf_helper.o(.text)
|
||||||
_xprintf_before_copy = _xprintf - (_BaS - LOADADDR(.bas));
|
_xprintf_before_copy = _xprintf - (_BaS - LOADADDR(.bas));
|
||||||
_display_progress_before_copy = _display_progress - (_BaS - LOADADDR(.bas));
|
_display_progress_before_copy = _display_progress - (_BaS - LOADADDR(.bas));
|
||||||
|
objs/cache.o(.text)
|
||||||
|
_flush_and_invalidate_caches_before_copy = _flush_and_invalidate_caches - (_BaS - LOADADDR(.bas));
|
||||||
objs/sd_card.o(.text)
|
objs/sd_card.o(.text)
|
||||||
objs/mmu.o(.text)
|
objs/mmu.o(.text)
|
||||||
objs/exceptions.o(.text)
|
objs/exceptions.o(.text)
|
||||||
|
|||||||
@@ -14,6 +14,8 @@
|
|||||||
|
|
||||||
extern void xprintf_before_copy(const char *fmt, ...);
|
extern void xprintf_before_copy(const char *fmt, ...);
|
||||||
#define xprintf xprintf_before_copy
|
#define xprintf xprintf_before_copy
|
||||||
|
extern void flush_and_invalidate_caches_before_copy(void);
|
||||||
|
#define flush_and_invalidate_caches flush_and_invalidate_caches_before_copy
|
||||||
|
|
||||||
#define UNUSED(x) (void)(x) /* Unused variable */
|
#define UNUSED(x) (void)(x) /* Unused variable */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user