[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Nonsense in manpage of strip?

From: Michael Holzt
Subject: Re: Nonsense in manpage of strip?
Date: Tue, 25 Jan 2005 11:50:41 +0100
User-agent: Mutt/1.5.6+20040907i

> >  Note - the choice of ".dbg" as an extension for the debug info
> >  file 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.

Yes, but 'foo.full' is already the 'foo' executable with included debugging
information, because in Step 2 we just preserved that as 'foo.full'. Why
should i copy that information into the stripped program, when i can achieve 
the same result by just taking the unstripped version?


      It's an insane world, but i'm proud to be a part of it. -- Bill Hicks

reply via email to

[Prev in Thread] Current Thread [Next in Thread]