On Sat, Apr 24, 2004 at 08:28:09AM +0200, Stanislaw Skowronek wrote: > why do we attempt to compile the kernel with 32-bit GAS abi and 64-bit GCC > abi? Is it because the module loader is broken and supports only 32-bit > ELFs? Then what about machines which load their kernels at weird 64-bit > addresses, like 0xa800000020004000 (Octane)? The whole thing was born as a dirty hack back in '99 or so to avoid the totally broken and imcomplete implementation of 64-bit MIPS ELF in binutils. By using these options we run the kernel in CKSEG0 which means 32-bit ELF will suffice. A nice side effect if a reduction of kernel size - this in the end made the code model which was born as a hack the way of choice. So there is no relation at all to modules. You btw. can load 64-bit ELF modules into a kernel which was built using above trick as 32-bit ELF. That's necessary because modules are currently allocated through vmalloc which allocates space in XKSEG. A code model which I'm considering as alternative is -G optimization but that will require a good bit of work; we would have to free up $28 which right now we're already using for the current pointer. A bunch of declaration would simply need to be fixed. Module loaders would need support for R_MIPS_GPREL16 and we'd need a solution for the problem of the kernel being too large, therefore overflowing the small data section. Th latter is probably going to require binutils hacking, so non-trivial. > I have changed it to 64-bit abi in my Octane kernel, because it won't even > compile otherwise. I've got gcc 3.3.2, gas 2.14. Octane has no memory at all in CKSEG0? > Paranoid: one who is truly in touch with reality. The fact that you're paranoid doesn't meant they're not out to get you. Ralf