From: Thiago C Silva Date: Thu, 22 Jan 2026 11:03:43 +0000 (+0100) Subject: binutils: Fix broken numbering in strip/objcopy --only-keep-debug doc X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3aefc8de553f51e7d8bac95e50dbf503b390af82;p=thirdparty%2Fbinutils-gdb.git binutils: Fix broken numbering in strip/objcopy --only-keep-debug doc The documentation for --only-keep-debug displayed the procedure steps as "1. 1. 1. 1." in the man pages, despite using the @enumerate command. This patch moves the item text to the line following the @item tag and adds whitespace between items. This forces the man page generator to correctly distinguish the items and increment the list counter. binutils/ * doc/binutils.texi (strip, objcopy): Reformat @enumerate list to fix man page numbering. --- diff --git a/binutils/doc/binutils.texi b/binutils/doc/binutils.texi index 3a4ed61f959..42957cba5b5 100644 --- a/binutils/doc/binutils.texi +++ b/binutils/doc/binutils.texi @@ -2086,14 +2086,20 @@ needed if debugging abilities are required. The suggested procedure to create these files is as follows: @enumerate -@item Link the executable as normal. Assuming that it is called -@code{foo} then... -@item Run @code{objcopy --only-keep-debug foo foo.dbg} to -create a file containing the debugging info. -@item Run @code{objcopy --strip-debug foo} to create a -stripped executable. -@item Run @code{objcopy --add-gnu-debuglink=foo.dbg foo} -to add a link to the debugging info into the stripped executable. +@item +Link the executable as normal. Assuming that it is called @code{foo} +then... + +@item +Run @code{objcopy --only-keep-debug foo foo.dbg} to create a file +containing the debugging info. + +@item +Run @code{objcopy --strip-debug foo} to create a stripped executable. + +@item +Run @code{objcopy --add-gnu-debuglink=foo.dbg foo} to add a link to the +debugging info into the stripped executable. @end enumerate Note---the choice of @code{.dbg} as an extension for the debug info @@ -2101,10 +2107,17 @@ file is arbitrary. Also the @code{--only-keep-debug} step is optional. You could instead do this: @enumerate -@item Link the executable as normal. -@item Copy @code{foo} to @code{foo.full} -@item Run @code{objcopy --strip-debug foo} -@item Run @code{objcopy --add-gnu-debuglink=foo.full foo} +@item +Link the executable as normal. + +@item +Copy @code{foo} to @code{foo.full}. + +@item +Run @code{objcopy --strip-debug foo}. + +@item +Run @code{objcopy --add-gnu-debuglink=foo.full foo}. @end enumerate i.e., the file pointed to by the @option{--add-gnu-debuglink} can be the @@ -3809,14 +3822,20 @@ needed if debugging abilities are required. The suggested procedure to create these files is as follows: @enumerate -@item Link the executable as normal. Assuming that it is called -@code{foo} then... -@item Run @code{objcopy --only-keep-debug foo foo.dbg} to -create a file containing the debugging info. -@item Run @code{objcopy --strip-debug foo} to create a -stripped executable. -@item Run @code{objcopy --add-gnu-debuglink=foo.dbg foo} -to add a link to the debugging info into the stripped executable. +@item +Link the executable as normal. Assuming that it is called @code{foo} +then... + +@item +Run @code{objcopy --only-keep-debug foo foo.dbg} to create a file +containing the debugging info. + +@item +Run @code{strip --strip-debug foo} to create a stripped executable. + +@item +Run @code{objcopy --add-gnu-debuglink=foo.dbg foo} to add a link to the +debugging info into the stripped executable. @end enumerate Note---the choice of @code{.dbg} as an extension for the debug info @@ -3824,10 +3843,17 @@ file is arbitrary. Also the @code{--only-keep-debug} step is optional. You could instead do this: @enumerate -@item Link the executable as normal. -@item Copy @code{foo} to @code{foo.full} -@item Run @code{strip --strip-debug foo} -@item Run @code{objcopy --add-gnu-debuglink=foo.full foo} +@item +Link the executable as normal. + +@item +Copy @code{foo} to @code{foo.full}. + +@item +Run @code{strip --strip-debug foo}. + +@item +Run @code{objcopy --add-gnu-debuglink=foo.full foo}. @end enumerate i.e., the file pointed to by the @option{--add-gnu-debuglink} can be the