Nicholas Clifton 45e966
*** ../binutils-2.19.51.0.14-copy-patched/binutils/doc/binutils.texi	2010-03-01 14:31:11.000000000 +0000
Nicholas Clifton 45e966
--- binutils/doc/binutils.texi	2010-03-01 16:23:00.000000000 +0000
Nicholas Clifton 45e966
*************** distribution and the second a debugging 
Nicholas Clifton 45e966
*** 1541,1546 ****
Nicholas Clifton 45e966
--- 1541,1587 ----
Nicholas Clifton 45e966
  needed if debugging abilities are required.  The suggested procedure
Nicholas Clifton 45e966
  to create these files is as follows:
Nicholas Clifton 45e966
  
Nicholas Clifton 45e966
+ @enumerate
Nicholas Clifton 45e966
+ @item
Nicholas Clifton 45e966
+ Link the executable as normal.  Assuming that it is called
Nicholas Clifton 45e966
+ @code{foo} then...
Nicholas Clifton 45e966
+ @item
Nicholas Clifton 45e966
+ Run @code{objcopy --only-keep-debug foo foo.dbg} to
Nicholas Clifton 45e966
+ create a file containing the debugging info.
Nicholas Clifton 45e966
+ @item
Nicholas Clifton 45e966
+ Run @code{objcopy --strip-debug foo} to create a
Nicholas Clifton 45e966
+ stripped executable.
Nicholas Clifton 45e966
+ @item
Nicholas Clifton 45e966
+ Run @code{objcopy --add-gnu-debuglink=foo.dbg foo}
Nicholas Clifton 45e966
+ to add a link to the debugging info into the stripped executable.
Nicholas Clifton 45e966
+ @end enumerate
Nicholas Clifton 45e966
+ 
Nicholas Clifton 45e966
+ Note---the choice of @code{.dbg} as an extension for the debug info
Nicholas Clifton 45e966
+ file is arbitrary.  Also the @code{--only-keep-debug} step is
Nicholas Clifton 45e966
+ optional.  You could instead do this:
Nicholas Clifton 45e966
+ 
Nicholas Clifton 45e966
+ @enumerate
Nicholas Clifton 45e966
+ @item
Nicholas Clifton 45e966
+ Link the executable as normal.
Nicholas Clifton 45e966
+ @item
Nicholas Clifton 45e966
+ Copy @code{foo} to  @code{foo.full}
Nicholas Clifton 45e966
+ @item
Nicholas Clifton 45e966
+ Run @code{objcopy --strip-debug foo}
Nicholas Clifton 45e966
+ @item
Nicholas Clifton 45e966
+ Run @code{objcopy --add-gnu-debuglink=foo.full foo}
Nicholas Clifton 45e966
+ @end enumerate
Nicholas Clifton 45e966
+ 
Nicholas Clifton 45e966
+ i.e., the file pointed to by the @option{--add-gnu-debuglink} can be the
Nicholas Clifton 45e966
+ full executable.  It does not have to be a file created by the
Nicholas Clifton 45e966
+ @option{--only-keep-debug} switch.
Nicholas Clifton 45e966
+ 
Nicholas Clifton 45e966
+ Note---this switch is only intended for use on fully linked files.  It
Nicholas Clifton 45e966
+ does not make sense to use it on object files where the debugging
Nicholas Clifton 45e966
+ information may be incomplete.  Besides the gnu_debuglink feature
Nicholas Clifton 45e966
+ currently only supports the presence of one filename containing
Nicholas Clifton 45e966
+ debugging information, not multiple filenames on a one-per-object-file
Nicholas Clifton 45e966
+ basis.
Nicholas Clifton 45e966
+ 
Nicholas Clifton 45e966
  @item --file-alignment @var{num}
Nicholas Clifton 45e966
  Specify the file alignment.  Sections in the file will always begin at
Nicholas Clifton 45e966
  file offsets which are multiples of this number.  This defaults to
Nicholas Clifton 45e966
*************** the subsystem version also.  Numeric val
Nicholas Clifton 45e966
*** 1584,1622 ****
Nicholas Clifton 45e966
  @var{which}.
Nicholas Clifton 45e966
  [This option is specific to PE targets.]
Nicholas Clifton 45e966
  
Nicholas Clifton 45e966
- @enumerate
Nicholas Clifton 45e966
- @item Link the executable as normal.  Assuming that is is called
Nicholas Clifton 45e966
- @code{foo} then...
Nicholas Clifton 45e966
- @item Run @code{objcopy --only-keep-debug foo foo.dbg} to
Nicholas Clifton 45e966
- create a file containing the debugging info.
Nicholas Clifton 45e966
- @item Run @code{objcopy --strip-debug foo} to create a
Nicholas Clifton 45e966
- stripped executable.
Nicholas Clifton 45e966
- @item Run @code{objcopy --add-gnu-debuglink=foo.dbg foo}
Nicholas Clifton 45e966
- to add a link to the debugging info into the stripped executable.
Nicholas Clifton 45e966
- @end enumerate
Nicholas Clifton 45e966
- 
Nicholas Clifton 45e966
- Note---the choice of @code{.dbg} as an extension for the debug info
Nicholas Clifton 45e966
- file is arbitrary.  Also the @code{--only-keep-debug} step is
Nicholas Clifton 45e966
- optional.  You could instead do this:
Nicholas Clifton 45e966
- 
Nicholas Clifton 45e966
- @enumerate
Nicholas Clifton 45e966
- @item Link the executable as normal.
Nicholas Clifton 45e966
- @item Copy @code{foo} to  @code{foo.full}
Nicholas Clifton 45e966
- @item Run @code{objcopy --strip-debug foo}
Nicholas Clifton 45e966
- @item Run @code{objcopy --add-gnu-debuglink=foo.full foo}
Nicholas Clifton 45e966
- @end enumerate
Nicholas Clifton 45e966
- 
Nicholas Clifton 45e966
- i.e., the file pointed to by the @option{--add-gnu-debuglink} can be the
Nicholas Clifton 45e966
- full executable.  It does not have to be a file created by the
Nicholas Clifton 45e966
- @option{--only-keep-debug} switch.
Nicholas Clifton 45e966
- 
Nicholas Clifton 45e966
- Note---this switch is only intended for use on fully linked files.  It
Nicholas Clifton 45e966
- does not make sense to use it on object files where the debugging
Nicholas Clifton 45e966
- information may be incomplete.  Besides the gnu_debuglink feature
Nicholas Clifton 45e966
- currently only supports the presence of one filename containing
Nicholas Clifton 45e966
- debugging information, not multiple filenames on a one-per-object-file
Nicholas Clifton 45e966
- basis.
Nicholas Clifton 45e966
- 
Nicholas Clifton 45e966
  @item --extract-symbol
Nicholas Clifton 45e966
  Keep the file's section flags and symbols but remove all section data.
Nicholas Clifton 45e966
  Specifically, the option:
Nicholas Clifton 45e966
--- 1625,1630 ----
Nicholas Clifton 45e966
*************** needed if debugging abilities are requir
Nicholas Clifton 45e966
*** 2650,2662 ****
Nicholas Clifton 45e966
  to create these files is as follows:
Nicholas Clifton 45e966
  
Nicholas Clifton 45e966
  @enumerate
Nicholas Clifton 45e966
! @item Link the executable as normal.  Assuming that is is called
Nicholas Clifton 45e966
  @code{foo} then...
Nicholas Clifton 45e966
! @item Run @code{objcopy --only-keep-debug foo foo.dbg} to
Nicholas Clifton 45e966
  create a file containing the debugging info.
Nicholas Clifton 45e966
! @item Run @code{objcopy --strip-debug foo} to create a
Nicholas Clifton 45e966
  stripped executable.
Nicholas Clifton 45e966
! @item Run @code{objcopy --add-gnu-debuglink=foo.dbg foo}
Nicholas Clifton 45e966
  to add a link to the debugging info into the stripped executable.
Nicholas Clifton 45e966
  @end enumerate
Nicholas Clifton 45e966
  
Nicholas Clifton 45e966
--- 2658,2674 ----
Nicholas Clifton 45e966
  to create these files is as follows:
Nicholas Clifton 45e966
  
Nicholas Clifton 45e966
  @enumerate
Nicholas Clifton 45e966
! @item
Nicholas Clifton 45e966
! Link the executable as normal.  Assuming that it is called
Nicholas Clifton 45e966
  @code{foo} then...
Nicholas Clifton 45e966
! @item
Nicholas Clifton 45e966
! Run @code{objcopy --only-keep-debug foo foo.dbg} to
Nicholas Clifton 45e966
  create a file containing the debugging info.
Nicholas Clifton 45e966
! @item
Nicholas Clifton 45e966
! Run @code{objcopy --strip-debug foo} to create a
Nicholas Clifton 45e966
  stripped executable.
Nicholas Clifton 45e966
! @item
Nicholas Clifton 45e966
! Run @code{objcopy --add-gnu-debuglink=foo.dbg foo}
Nicholas Clifton 45e966
  to add a link to the debugging info into the stripped executable.
Nicholas Clifton 45e966
  @end enumerate
Nicholas Clifton 45e966
  
Nicholas Clifton 45e966
*************** file is arbitrary.  Also the @code{--onl
Nicholas Clifton 45e966
*** 2665,2674 ****
Nicholas Clifton 45e966
  optional.  You could instead do this:
Nicholas Clifton 45e966
  
Nicholas Clifton 45e966
  @enumerate
Nicholas Clifton 45e966
! @item Link the executable as normal.
Nicholas Clifton 45e966
! @item Copy @code{foo} to @code{foo.full}
Nicholas Clifton 45e966
! @item Run @code{strip --strip-debug foo}
Nicholas Clifton 45e966
! @item Run @code{objcopy --add-gnu-debuglink=foo.full foo}
Nicholas Clifton 45e966
  @end enumerate
Nicholas Clifton 45e966
  
Nicholas Clifton 45e966
  i.e., the file pointed to by the @option{--add-gnu-debuglink} can be the
Nicholas Clifton 45e966
--- 2677,2690 ----
Nicholas Clifton 45e966
  optional.  You could instead do this:
Nicholas Clifton 45e966
  
Nicholas Clifton 45e966
  @enumerate
Nicholas Clifton 45e966
! @item
Nicholas Clifton 45e966
! Link the executable as normal.
Nicholas Clifton 45e966
! @item
Nicholas Clifton 45e966
! Copy @code{foo} to @code{foo.full}
Nicholas Clifton 45e966
! @item
Nicholas Clifton 45e966
! Run @code{strip --strip-debug foo}
Nicholas Clifton 45e966
! @item
Nicholas Clifton 45e966
! Run @code{objcopy --add-gnu-debuglink=foo.full foo}
Nicholas Clifton 45e966
  @end enumerate
Nicholas Clifton 45e966
  
Nicholas Clifton 45e966
  i.e., the file pointed to by the @option{--add-gnu-debuglink} can be the