ld linker script and addrs of labels

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.
Post Reply
FlashBurn
Member
Member
Posts: 313
Joined: Fri Oct 20, 2006 10:14 am

ld linker script and addrs of labels

Post 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.
FlashBurn
Member
Member
Posts: 313
Joined: Fri Oct 20, 2006 10:14 am

Post 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?
Post Reply