On 2009-07-03 16:41, Patrick M. Hausen wrote:
> But I thought, they were in the kernel itself?
> 
> %file /boot/kernel/kernel
> /boot/kernel/kernel: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), 
> dynamically linked (uses shared libs), not stripped
> 
> "not stripped" - i.e. "with debug symbols". Wrong? Since when?

Well, only the debug symbols have been stripped, not any others.  If you
look in /usr/src/sys/conf/kern.post.mk, you will see this fragment:

${KERNEL_KO}: ${FULLKERNEL} ${KERNEL_KO}.symbols
        ${OBJCOPY} --strip-debug --add-gnu-debuglink=${KERNEL_KO}.symbols\
            ${FULLKERNEL} ${.TARGET}
${KERNEL_KO}.symbols: ${FULLKERNEL}
        ${OBJCOPY} --only-keep-debug ${FULLKERNEL} ${.TARGET}

E.g. the debug stuff is put into the .symbols files.  The kernel itself
still contains the function and data names, though:

$ objdump -t /boot/kernel/kernel

/boot/kernel/kernel:     file format elf32-i386-freebsd

SYMBOL TABLE:
c092de00 l       .data  00000000 tmpstk
c092de58 l       .data  00000000 physfree
c092de64 l       .data  00000000 proc0uarea
[...]

If you want to build absolutely without any symbols whatsover, remove
the "makeoptions DEBUG=-g" line from your kernel config file.
_______________________________________________
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"

Reply via email to