This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

man objdump: only-keep-debug error


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.

           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
binutils-2.19.51                            2009-07-04
$ 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 

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]