well, I defined a macro DBG printk(KERN_DEBUG "File : %s Line:%i\n", __FILE__, __LINE__); and put it on almost every line.
But I didn't use it. Please, someone, hit me. Shoot me in the head.
It just came to my mind that I was on a x86_64 arch, so the addresses are.. 2 times longers
So, blindly following your instructions when it came to the linking part was just *stupid* of me
On a 64bits arch, | colrm 9 when grepping the System.map will only output "ffffffff".
Every added symbol had a 0xfffffff address in the module, so no wonder it didn't work. I did it again with the full address, and it was much, much better
For the debian users out here, here is how I added the symbols :
for sym in xen_tlb_flush force_evtchn_callback xen_features; do
export $sym=$(egrep " $sym\$" /boot/System.map-xen0-2.6.16-1-xen-amd64-k8 | colrm 17)
ld -m elf_x86_64 --defsym xen_tlb_flush=0x$xen_tlb_flush --defsym force_evtchn_callback=0x$force_evtchn_callback --defsym xen_features=0x$xen_features -r -o nvidia.ko nvidia.o nvidia.mod.o
Don't forget to change the colrm 17 to colrm 9 if you're on x86 !
Thanks for your help, Bernhard, it works perfectly now. Great work !