Difference in fields symtab and ddbsymtab in elf_file_t structure (defined in link_elf.c) in FreeBSD

Shrikanth Kamath shrikanth07@gmail.com
Wed Dec 5 06:55:00 GMT 2012


This is regarding the fields in the structure "elf_file_t" in link_elf.c.
For some kernel modules the symtab field is different from the
ddbsymtab field for some it is the same, would like to know what is
the difference between the two and how to enable ddbsymtab?

Does enabling "-g" in CFLAGS make the binary build the ddbsymtab
different from symtab?

The problem is lookup for some symbols in the kernel module that I
built returns with undefined, on inspecting it was getting a ENOENT
from the function
    link_elf_lookup_symbol()
    {
         ...
         /* If we have not found it, look at the full table (if loaded) */
         if (ef->symtab == ef->ddbsymtab)
             return (ENOENT);
         ...
    }

--
Shrikanth R K



More information about the Gdb mailing list