|
From: | Nick Clifton |
Subject: | Re: Nonsense in manpage of strip? |
Date: | Tue, 25 Jan 2005 09:41:08 +0000 |
User-agent: | Mozilla Thunderbird 1.0 (X11/20041206) |
Hi Michael,
The manpage of strip from binutils-2.14.91 has the following text regarding having detached debug information: Note - the choice of ".dbg" as an extension for the debug infofile is arbitrary. Also the "--only-keep-debug" step is optional. You could instead do this:1.<Link the executable as normal.> 2.<Copy "foo" to "foo.full"> 3.<Run "strip --strip-debug foo"> 4.<Run "objcopy --add-gnu-debuglink=foo.full foo"> Shouldn't Step 4 not simply be '<Copy "foo.full" to "foo">'?
No, the --add-gnu-debuglink switch actually causes objcopy to insert a new section (.gnu.debuglink) into the program it is copying. This section is used by debuggers to locate the stripped out debug information when they load the "foo" executable.
Cheers Nick
[Prev in Thread] | Current Thread | [Next in Thread] |