Page 1 of 1

kernel symbol table

Posted: Sat Jan 14, 2006 12:00 am
by eaburns
I am having a problem looking at the ELF symbol table.
Here's the situation. x86 real mode opreating system, GRUB is used to boot the kernel. The multiboot information stored in %ebx gives information about the section header table; address, num entries, size of entry etc. So I use this information to find the symbol table, however, In my initial boot code I over write a few pages after the kernel's text and data segmetns with some initial page tables. This same memory that seems holds the symbol table section (and friends), so they get over written.
I was wondering if there is a way (using linker scripts or such) to force the symbol table section(s) to be BEFORE the other sections?

Any help would be appreciated.

Thanks, Ethan

Re: kernel symbol table

Posted: Mon Jan 16, 2006 12:00 am
by blackcatcoder
yes, of course there is a method to to the symbol table during linking!


you'll need to declare a own section in the ld linker scipt!

like .symtab ...

then declare a define with this section like MODULE_EXPORT ... struct and the section (.symtab)

if you're interested on how to do that exactly look on my Os site on Friday!

if you don't want to wait look at the linux source code!

If you've any question according to this problem please mail me!

greeds