The compiler/linker is generating incorrect addresses for my function
pointers and global pointers when I build the kernel. It's adding 0x10000
to all of them.
Say, for example I have a global struct at 0x8000aa00. When I pass a
pointer to that struct, the compiler/linker generate code that passes
0x8001aa00 instead of 0x8000aa00.
I've been able to reproduce the problem in a small test application. I
hacked out almost everything out of a copy of arch/mips/kernel/head.S until
I found the problem. Now I can make it disapper in my test app by
commenting one line in head.S. It's a line toward the bottom that says:
It's from that area at the bottom of arch/mips/kernel/head.S that EXPORTs
kernel_sp, swapper_pg_dir, etc.