x86_64 module loader reloc problem
Using test8 I'm only able to load kernel modules on x86_64 systems if I comment out the overflow check for R_X86_64_32 relocation entries in arch/x64_64/kernel/module.c.
With the check in place I get errors like this:
overflow in relocation type 10 val ffffff0000426b88" errors `test' likely not compiled with -mcmodel=kernel
insmod: error inserting 'test.ko': -1 Invalid module format
Yes, I'm using -mcmodel=kernel. I'm also using module-init-tools 0.9.15-pre2. Once loaded, the modules appear to be working properly, but it wouldn't surprise me if a time bomb was lurking there.
What am I doing wrong? Compiler used for both kernel and modules is gcc (GCC) 3.2.3 20030502 (Red Hat Linux 3.2.3-20).
Note that in my linked test module, objdump shows 632 R_X86_64_32 reloc entries and only 18 R_X86_64_64 reloc entries.
Take care,
Jason