If I write a simple library, e.g.
void swap(int *a, int *b) {
int temp;
temp = *a;
*a = *b;
*b = temp;
}
After compiled to a static library, say "swap.a", is it possible to call this function and link from a kernel code?
This question says linking shared library in kernel is impossible, because loading a shared library demands a loader, which is running on user space. But I don't understand why static library cannot be used in kernel space, as the loader is not needed.