Page 2 of 2

Re: How to tell g++ to use only relative instructions?

Posted: Fri Feb 19, 2010 6:21 am
by sebihepp
In our kernel we load kernel modules which are basically just ELF object files (linked with "-r"). They are relocated at runtime by the module loader, which finds space in the area of memory reserved for modules and then loads the module into that region. It performs relocation and linking against both the kernel symbols and the symbols of other modules that are present.
Hey, that's an interessting idea. :) The Kernel is like a runtime linker. :D
I'm not sure about much of your kernel design, but maybe you could pick something up from our design and make it work for you?
Thanks, but I want to write my own code and learn something.

Re: How to tell g++ to use only relative instructions?

Posted: Fri Feb 19, 2010 6:37 pm
by pcmattman
sebihepp wrote:
I'm not sure about much of your kernel design, but maybe you could pick something up from our design and make it work for you?
Thanks, but I want to write my own code and learn something.
Absolutely. I meant pick up design ideas, not free code, though :)