Page 1 of 1

ld linker script and addrs of labels

Posted: Fri Sep 21, 2007 1:37 pm
by FlashBurn
I´m finally trying to move my kernel from asm to c. So now I have 1 big problem left, my label table.

I want to use elf for my kernel. So what have I to do that the labels I want to be in the label list of the elf are there?

And another problem I have. Is there a way that I can say create relocatable entries int the elf file for "foo" and all calls to "foo" get these entries? Or have I to use function pointers and change them when I want to change the addr which gets called?

I need this for things like the scheduler, where I have 1 scheduler but many functions how the threads get enqueued (because of difference of the cpu).

I want a kernel which runs fine w/o that I have to relocate the things, but that I can relocate it later!

In assembly I used indirect calls, but I like to get rid of these.

Posted: Mon Sep 24, 2007 9:46 am
by FlashBurn
Ok, the problems of the labels is done and also the relocations. But now I have the relocations for all labels in the elf file. Is there a way to say which relocations I want to have in hte elf file?