modules external refs
I have a product consisting in several loadable modules, among which one is the central controler.
When I load this on I do not have any problems, as it has external references
only from the kernel.
But all the other modules call functions from this module.
I started only with a module calling this controler.
I verified that in /proc/ksyms all the functions of the controler are described.
I have put a printk in the second module trying to access the controler in which I print the address of the function it tries to call, it corresponds to what
I see in /proc/ksyms, but when I call that function, I get a Unimplemented Instruction Address fault .
I have tried to declare the function with a hardcoded address, and it works "fine",
Iit seems that the external function reference is not resolved properly when I load the module.
I do not have the version enabled in my environment.
What do I need to do to make it work, it used to work fine on a IA32 machine , but
not on a BIGSUR.
Thanks
Gerard LYONNAZ
Quoted 5 lines · gerard
I have put a printk in the second module trying to access the controler in which I print the address of the function it tries to call, it corresponds to what
I see in/proc/ksyms, but when I call that function, I get a Unimplemented Instruction Address fault .
IA64 function pointers do not point to the function, instead they point to a descriptor area which contains data about the function, including its real address. If you are calling direct to the address in ksyms then you are bypassing the function descriptor and r1 will contain an incorrect value. Also make sure that your modules are compiled with the correct options, compile an existing module and copy the flags.