I'm working on a 32-bit kernel. Some functions, for example vsprintf() need to be able to print 64-bit integers.
However, when I try to use uintmax_t or uint64_t in the helper functions for vsprintf() I get a linker error:
Code: Select all
libc/stdio/vsnprintf.o: In function `uint2cstr.part.0':
vsnprintf.c:(.text+0x40): undefined reference to `__umoddi3'
vsnprintf.c:(.text+0x66): undefined reference to `__udivdi3'
Code: Select all
LDFLAGS := -T linker.ld -m elf_i386 -nostdlib -lgcc -lc
ld: cannot find -lgcc
ld: cannot find -lc
Thanks.