Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
The module support for my kernel is nearly finished . I only can't figure out when the ELF-file tells me that the call is relative, how I can link that address to a function in my kernel. When I use an absolute address in my module (by using a function pointer), it works all fine - except printing strings. Direct values (using putchar) works fine - a whole string with puts prints a whole bunch of weird characters on the screen.
*((uint*)(section.bits + rel.r_offset)) = 0xfffffffc - ((target - exports[i].addr) + rel.r_offset + section.base);
/* section.bits = programbits
* 0xfffffffc = start at 0 at function (not sure about this, but it works)
* target = where the program is in the memory
* exports[i].addr = the address of the function in the kernel
* rel.r_offset = where in the kernel the function is called
*/
so this code works... but i'm not sure this'll work in all cases?