Huh? How is it possible that a .ko is linked against a .so?
Sent from my GT-P1000 using XDA App
Very good question areshinakya! I hope I can provide a suitable and satisfactory answer:
Well, first off, "linking against" is something else than "depending/relying on". Secondly, if you have a module for say, a VGA adapter that requires executable code that exists in an external library that is closed source and you have to create a stub that links to it and executes it in a suitable manner, what would you call it?
Secondly, think of generic kernel modules that mix, match and load different pre-compiled code bases and execute them accordingly depending on the system configuration. This is how wpa_supplicant used to work back in the day; now, not so much. It would load different drivers depending on the WLAN card chipset detected through udev, dbus or whatever (don't remember exactly atm, it's been quite a few years, lol) and loaded the appropriate code. In this case it was a ".o" file not an ".so", but it was executable code nonetheless.
The additional "s" simply means it's shared... Kernel Object, Shared Object, plain and simple Object files are all executable. There is no special way to link to them, you just call them up with your own code, pre-load them or call parts of their code as required. The linking I think you were referring to can only happen with header files, but that's another story altogether. The devs here can explain that a lot better than I could!
Cheers,
C.
Last edited: