From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 029773959CB3 for ; Sat, 19 Sep 2020 12:42:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 029773959CB3 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=ludo@gnu.org Received: from fencepost.gnu.org ([2001:470:142:3::e]:43665) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kJcC9-0007cP-6x for binutils@sourceware.org; Sat, 19 Sep 2020 08:42:25 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=47232 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kJcC8-00050D-PC for binutils@sourceware.org; Sat, 19 Sep 2020 08:42:24 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: binutils@sourceware.org Subject: [PATCH] doc: Clarify that =?utf-8?Q?=E2=80=98--strip-unneeded?= =?utf-8?Q?=E2=80=99?= implies =?utf-8?Q?=E2=80=98--strip-debug=E2=80=99?= X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Jour de la Raison de =?utf-8?Q?l'Ann=C3=A9e?= 228 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Sat, 19 Sep 2020 14:42:23 +0200 Message-ID: <87wo0qq6og.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Status: No, score=-9.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Sep 2020 12:42:28 -0000 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello, My reading of objcopy.c is that =E2=80=98--strip-unneeded=E2=80=99 implies =E2=80=98--strip-debug=E2=80=99: --8<---------------cut here---------------start------------->8--- else if ((flags & BSF_DEBUGGING) !=3D 0) /* Debugging symbol. */ keep =3D (strip_symbols !=3D STRIP_DEBUG && strip_symbols !=3D STRIP_UNNEEDED && ! convert_debugging); --8<---------------cut here---------------end--------------->8--- What about the patch below to clarify that in the manual? Thanks, Ludo=E2=80=99. binutils/ChangeLog 2020-09-19 Ludovic Court=C3=A8s * doc/binutils.texi (objcopy, strip): Say that '--strip-unneeded' implies '--strip-debug'. --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/binutils/doc/binutils.texi b/binutils/doc/binutils.texi index 35a5a67041e..f0ef78eda1d 100644 --- a/binutils/doc/binutils.texi +++ b/binutils/doc/binutils.texi @@ -1410,7 +1410,9 @@ Do not copy relocation and symbol information from the source file. Do not copy debugging symbols or sections from the source file. @item --strip-unneeded -Strip all symbols that are not needed for relocation processing. +Strip all symbols that are not needed for relocation processing in +addition to debugging symbols and sections stripped by +@option{--strip-debug}. @item -K @var{symbolname} @itemx --keep-symbol=@var{symbolname} @@ -3387,7 +3389,9 @@ See the description of this option in the @command{objcopy} section for more information. @item --strip-unneeded -Remove all symbols that are not needed for relocation processing. +Remove all symbols that are not needed for relocation processing in +addition to debugging symbols and sections stripped by +@option{--strip-debug}. @item -K @var{symbolname} @itemx --keep-symbol=@var{symbolname} --=-=-=--