[Haifux] Injecting a 32-bit module into a 64-bit kernel?!
eli at billauer.co.il
Sun Feb 14 14:55:00 MSK 2010
First and foremost: I have a workaround for my problem. I'm asking this
for the sake of elegance, and possibly for patching an existing package
The problem is running a winmodem (for use as a fax) with precompiled
binaries on a 64-bit kernel. Specifically, getting the slamr module
injected into the kernel, which is a bundle of a 32-bit precompiled .o
elf and a locally compiled wrapper.
When compiling the kernel module under a 64-bit machine (say FC12 for
x86_64), the wrapper code is compiled as 64 bit with the -m32 flag, but
then ld complains that it can't mingle a 32-bit elf with a 64-bit elf.
Which sounds like a good excuse.
So I wondered if I could compile it all as 32 bit, and then somehow get
the 64-bit kernel to accept this alien module?
My immediate thought was that a free software community won't stretch
far to solve a problem which is only relevant when injecting non-free
software into the kernel. But maybe...
In case you wondered, my planned workaround is to let my old, 32-bit
Redhat 7.3, which will run as a virtual machine, do the faxing for me. I
could also buy an external modem. I'm tackling this now because I expect
similar problems to arise in the future. Running 64 bits is an educating
experience, to put it gently.
More information about the Haifux