delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/08/27/09:19:52

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
Date: Thu, 27 Aug 2009 15:19:33 +0200
Message-ID: <6910a60908270619l5fd49c5cgf705ccbbb1e68994@mail.gmail.com>
Subject: man objdump: only-keep-debug error
From: Reini Urban <rurban AT x-ray DOT at>
To: The Cygwin Mailing List <cygwin AT cygwin DOT com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Christopher,

In man(1) page for objdump (latest binutils 1.7) the list for the
only-keep-debug steps is below under the
 --subsystem which:major.minor section, and should be moved upwards to
the only-keep-debug section.

=================================
 --only-keep-debug
           Strip  a  file,  removing  contents  of  any  sections
that  would  not be stripped by
           --strip-debug and leaving the debugging sections intact.
In ELF files, this  preserves
           all note sections in the output.

           The  intention is that this option will be used in
conjunction with --add-gnu-debuglink
           to create a two part executable.  One a stripped binary
which will occupy less space in
           RAM  and  in  a  distribution and the second a debugging
information file which is only
           needed if debugging abilities are required.  The suggested
procedure  to  create  these
           files is as follows:

--file-alignment num
...
 --subsystem which:major.minor
           Specifies  the  subsystem  under which your program will
execute.  The legal values for
           which are "native", "windows", "console",  "posix",
"efi-app",  "efi-bsd",  "efi-rtd",
           "sal-rtd",  and  "xbox".   You  may optionally set the
subsystem version also.  Numeric
           values are also accepted for which.  [This option is
specific to PE targets.]

           1.<Link the executable as normal.  Assuming that is is called>
               "foo" then...

           1.<Run "objcopy --only-keep-debug foo foo.dbg" to>
               create a file containing the debugging info.

           1.<Run "objcopy --strip-debug foo" to create a>
               stripped executable.

           1.<Run "objcopy --add-gnu-debuglink=foo.dbg foo">
               to add a link to the debugging info into the stripped executable.

           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.>
           1.<Copy "foo" to  "foo.full">
           1.<Run "objcopy --strip-debug foo">
           1.<Run "objcopy --add-gnu-debuglink=foo.full foo">

           i.e.,  the  file  pointed to by the --add-gnu-debuglink can
be the full executable.  It
           does not have to be a file created by the --only-keep-debug switch.

           Note---this switch is only intended for use on fully linked
files.  It  does  not  make
           sense  to  use  it  on  object files where the debugging
information may be incomplete.
           Besides the gnu_debuglink feature currently only supports
the presence of one  filename
           containing  debugging  information,  not  multiple
filenames  on a one-per-object-file
           basis.
=================================
binutils-2.19.51                            2009-07-04
                 OBJCOPY(1)
$ man --version
man, version 1.6e

/usr/share/misc/man.conf is untouched.
Do you need my man -d objdump or can you reproduce it?

$ man -d objdump
...
not executing command:
(cd "/usr/share/man" && (echo ".ll 9.7i"; echo ".nr LL 9.7i"; echo
".pl 1100i"; /usr/bin/gunzip -c '/usr/share/man/man1/objcopy.1.gz';
echo ".\\\""; echo ".pl \n(nlu+10") | /usr/bin/tbl | /usr/bin/nroff -c
-mandoc 2>/dev/null | /usr/bin/less -R)
-- 
Reini Urban
http://phpwiki.org/           http://murbreak.at/

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019