Hi all,

If someone would like to try something:
 The GNU binutils support the notion of splitting symbols out from the 
executable, and shipping them around separately.
 Microsoft have supported this in the form of .PDB vs .EXE (the PDB file 
contains all the debug information).

FreeBSD's kernel (and modules) build using this technique. The debugging 
symbols are saved to a separate file, and the kernel is relinked using 
the Binutils 'objcopy' command, with a special option '--add-gnu-debuglink':

%%%
${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}
%%%

Normally, on an embedded target, we don't want the symbols; they make 
the executables huge. In the case of C++, doubly so.

So a great idea for an enhancement would be to tweak the SCons build, so 
that it can keep the symbols, whilst adding the link to the executable. 
That way, we can keep the symbols around after something gets shipped.

cheers,
BMS

_______________________________________________
Xorp-hackers mailing list
[email protected]
http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers

Reply via email to