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