Subject: Re: kernel symbols
To: Jachym Holecek <freza@dspfpga.com>
From: Frank Wille <frank@phoenix.owl.de>
List: port-powerpc
Date: 01/14/2007 00:16:10
Jachym Holecek wrote:

>> I understand that ksyms_init() is called during system startup with the
>> start- and end-address of the ELF file, containing the symbols. But
>> making the loader transfer the whole ELF file into memory can't be the
>> solution, because I have to clear the BSS space, which overwrites the
>> symbols at the end of the file.
>> 
>> How is it done on other PPC ports?
> 
> Well, either the bootloader gives you the ELF image and ksyms_init() will
> pick up the .symtab and .strtab sections, or you use

Then the bootloader, which I have to write, loads the ELF image twice? First
at the target address, to be able to start the kernel, and a second time just
to pass it to ksyms_init()?

What a waste of memory!


>  options SYMTAB_SPACE=<size>
> 
> in your kernel config, in which case sys/conf/Makefile.kern.inc will
> use dbsym(8) to copy the symbol table into a variable.

Sure, would be a solution. But theoretically I have the ELF image with full
symbol information, so why not use it?


-- 
    _  Frank Wille (frank@phoenix.owl.de)
 _ //  http://sun.hasenbraten.de/~frank/
 \X/   Phx @ #AmigaGer