Kris Kennaway wrote:
> + execlp("strip", "strip", "-s", "-R", ".comment",
> + "-R", ".note", "-N", "gcc2_compiled",
> + to_name, (char *)NULL);
Some comments:
.note: used in ELF branding.
gcc2_compiled: used by gdb
I miss the mcs(1) command (manipulate comment section). Specifically,
you did a 'mcs -c progname' and it compressed and removed any duplicate
comment strings. This was ideal for moving your rcsid strings into from
header files.
Regarding stripping gcc2_compiled.. strip can only filter symbols from
the .symtab and .symstr symbol tables. Since strip already removes both
of those sections, the -N gcc2_compiled is useless. strip cannot modify
the .dynsym/.dynstr in the PT_LOAD sections, so those will stay regardless.
In all, I think this -R gcc2_compiled. is useless unless you're in -X or
-D mode (only remove debug symbols etc).
gdb uses gcc2_compiled to tune its understanding of the generated code.
I suspect the fact that we remove this from the kernel is part of the reason
gdb has so much trouble understanding local variables in gdb -k mode.
(It doesn't understand trap frames either, but thats another story.)
Removing the .note *section* is probably a good idea since it is effectively
useless in an executable. The PT_NOTE executable header is unaffected by
stripping the leftover .note section contents.
Cheers,
-Peter
--
Peter Wemm - [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
"All of this is for nothing if we don't go to the stars" - JMS/B5
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message