Problem porting newlib
Posted: Sat Jun 05, 2010 11:44 am
I have cross-compiled binutils/gcc/newlib. I've been using them to build my 64bit, -2GB kernel. Everything has been going well for months. I'm careful not to call malloc, printf and the like for the obvious reason and have my own kprintf and kmalloc etc.
The problem is that now I'm starting to port my apps. Some functions, like 'open' link okay, whenever I call 'printf' or 'malloc' and others I get messages like thisDoes anyone have any idea what the problem might be?
I've just realised that I didn't supply any memory model (-mcmodel=kernel) to build newlib. Could that be the problem? Do I need 2 different builds of newlib? One for kernel space and one for user?
Thanks.
The problem is that now I'm starting to port my apps. Some functions, like 'open' link okay, whenever I call 'printf' or 'malloc' and others I get messages like this
Code: Select all
/Users/gerryg/tools/newlib-build/x86_64-artix/newlib/libc/stdio/printf.c:29: relocation truncated to fit: R_X86_64_32 against `.text'
I've just realised that I didn't supply any memory model (-mcmodel=kernel) to build newlib. Could that be the problem? Do I need 2 different builds of newlib? One for kernel space and one for user?
Thanks.