Fix long long support for miniios vsprintf

This commit is contained in:
marcan 2009-03-19 16:24:23 +01:00 committed by bushing
parent d6e55bbcd0
commit 77ca5f888c
4 changed files with 17 additions and 6 deletions

View File

@ -12,7 +12,7 @@ TARGET = armboot.bin
ELF = armboot.elf ELF = armboot.elf
OBJECTS = start.o main.o ipc.o vsprintf.o string.o gecko.o memory.o memory_asm.o \ OBJECTS = start.o main.o ipc.o vsprintf.o string.o gecko.o memory.o memory_asm.o \
utils_asm.o utils.o ff.o diskio.o sdhc.o powerpc_elf.o powerpc.o panic.o irq.o irq_asm.o \ utils_asm.o utils.o ff.o diskio.o sdhc.o powerpc_elf.o powerpc.o panic.o irq.o irq_asm.o \
exception.o exception_asm.o seeprom.o crypto.o nand.o boot2.o exception.o exception_asm.o seeprom.o crypto.o nand.o boot2.o ldhack.o
$(TARGET) : $(ELF) $(ELFLOADER) $(TARGET) : $(ELF) $(ELFLOADER)
@echo "MAKEBIN $@" @echo "MAKEBIN $@"

4
ldhack.c Normal file
View File

@ -0,0 +1,4 @@
/* This makes LD avoid including the exception unwinder for long long division support */
char __aeabi_unwind_cpp_pr0[0];

View File

@ -110,5 +110,12 @@ SECTIONS
__excstack_addr = .; __excstack_addr = .;
} >sram2 } >sram2
/DISCARD/ :
{
*(.ARM.exidx*)
*(.ARM.extab*)
} }
}

View File

@ -99,11 +99,11 @@
#define VA_START(ap, last) va_start(ap, last) #define VA_START(ap, last) va_start(ap, last)
#define VA_SHIFT(ap, value, type) /* No-op for ANSI C. */ #define VA_SHIFT(ap, value, type) /* No-op for ANSI C. */
#define ULLONG unsigned long #define ULLONG unsigned long long
#define UINTMAX_T unsigned long #define UINTMAX_T unsigned long long
#define UINTMAX_MAX ULONG_MAX #define UINTMAX_MAX ULLONG_MAX
#define LLONG long #define LLONG long long
#define INTMAX_T long #define INTMAX_T long long
/* Support for uintptr_t. */ /* Support for uintptr_t. */
#ifndef UINTPTR_T #ifndef UINTPTR_T