Subject: Re: kernel symbols
To: Frank Wille <frank@phoenix.owl.de>
From: Jachym Holecek <freza@dspfpga.com>
List: port-powerpc
Date: 01/13/2007 23:08:15
Hello,

# Frank Wille 2007-01-13:
> I don't know what I have to do to make ddb work with kernel symbols.
> 
> 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

  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. See

  sys/kern/kern_ksyms.c

for the details.

HTH,
	-- Jachym