Out of curiosity I tried to compile a standalone lib (without any include from libc) I wrote and then link it into a kernel module without the "-mcmodel=kernel" flag. I saw this thread , so I tried with -fpic but then I receive "undefined reference to _global_offset_table_". I also saw this thread but it has no answers.
I would like to know if it is possible to compile it, and how?
Thanks,