From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) by sourceware.org (Postfix) with ESMTPS id 452473856DE6 for ; Tue, 30 May 2023 17:13:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 452473856DE6 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-64d2f99c8c3so3455470b3a.0 for ; Tue, 30 May 2023 10:13:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685466796; x=1688058796; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Xaf0X4Kuw3Z5IzzCvb+hJGSCbyiH/+P2KKksCgp6glE=; b=CuldeEuXRRHGgDY36s6bWuk21xS03TFA+AVT04sAg7eN0SpbOXV0aThvNbmUOms8IL QV9qVsH53TGX1HtHutIBBxu2sfon9h7NBtXWbTbf5gPsqQlAi6geiYoxFkVxonq19Fk7 WAwE6OHq8aM1QQZF9szfibmOeDovikpeBJRNVfouiIYB54+ry5R5A4W7+g+RETDj+YUd oeo4quVToPzO/F3wMpVkGY8bCdo+HComJjXqyyU9lEiJk+ETu6VQvRBhviuPdwnR+HRl cMKSS9YO1xC++uiSWRtu8pvCgCccSr4aGuzifQKrtGEw89qReI2ZGwwaIc5NNk4vec9l tBdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685466796; x=1688058796; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Xaf0X4Kuw3Z5IzzCvb+hJGSCbyiH/+P2KKksCgp6glE=; b=B8fdpkkfcBdljULuPmaj5FFUrVbkrCA2i56MjL9dDlI8jvc7hcUCAQon91Ok7UHk73 xwcBIBUAl2SqwCd7Hsv2qpSDy4/h6cbaWHyFeTJAG56tqir5GApWAdzR/z5lXe4LLs35 X9LQTrit00Cyo3SZn04tA4I/TEgakcVgOb+iK64RwvAwBg6M14T/91wfHMWAP6yNrLnZ 3JSp1JlEJOiXKx9bFV8oYm+C4xn5QwuJwclPGOFjiMRAF6+HrsAVRdDCinrb3sPfFP+b oKb5EHcQOTxd5+UauQRf7GLPbDESqELCKVfJNH8kPORDS+tdrJG+3OWwPy5HVma6+324 nDlQ== X-Gm-Message-State: AC+VfDxYAisQJWhMu23uXL6vl8zROm2OCrIMcODCe0BCA2Sv0c2htx+W rkzbhlLllZTRf+3D8z5HB0I= X-Google-Smtp-Source: ACHHUZ7dONf3+zD2ZoVZbhuCaUBzMPWVAmt1KsShy3lwAOtajZWNnVKh9dDoz2PvQi9HkE7FHiveTA== X-Received: by 2002:a17:902:8503:b0:1ae:4bbb:e958 with SMTP id bj3-20020a170902850300b001ae4bbbe958mr2884377plb.14.1685466796153; Tue, 30 May 2023 10:13:16 -0700 (PDT) Received: from gnu-cfl-3.localdomain ([172.59.160.123]) by smtp.gmail.com with ESMTPSA id bf5-20020a170902b90500b001b0772fe3fdsm363726plb.265.2023.05.30.10.13.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 May 2023 10:13:15 -0700 (PDT) Received: from gnu-cfl-3.. (localhost [IPv6:::1]) by gnu-cfl-3.localdomain (Postfix) with ESMTP id B7E937402E8; Tue, 30 May 2023 10:13:14 -0700 (PDT) From: "H.J. Lu" To: binutils@sourceware.org Cc: Kaylee Blake Subject: [PATCH 4/6] binutils: Add a --strip-sections test Date: Tue, 30 May 2023 10:12:50 -0700 Message-Id: <20230530171252.269552-5-hjl.tools@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230530171252.269552-1-hjl.tools@gmail.com> References: <20230530171252.269552-1-hjl.tools@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3024.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: PR ld/25617 * testsuite/binutils-all/objcopy.exp: Run strip-sections-1. * testsuite/binutils-all/strip-sections-1.d: New file. --- binutils/testsuite/binutils-all/objcopy.exp | 5 +++++ binutils/testsuite/binutils-all/strip-sections-1.d | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 binutils/testsuite/binutils-all/strip-sections-1.d diff --git a/binutils/testsuite/binutils-all/objcopy.exp b/binutils/testsuite/binutils-all/objcopy.exp index 361e430f119..d39ea141a3a 100644 --- a/binutils/testsuite/binutils-all/objcopy.exp +++ b/binutils/testsuite/binutils-all/objcopy.exp @@ -1357,6 +1357,11 @@ if [is_elf_format] { verbose [file rootname $t] run_dump_test [file rootname $t] } + + # Test --strip-sections + run_dump_test "strip-sections-1" [list \ + [list source strip-15${reloc_format}.s] \ + [list as "${elf64} --defsym RELOC=${reloc}"]] } run_dump_test "localize-hidden-2" diff --git a/binutils/testsuite/binutils-all/strip-sections-1.d b/binutils/testsuite/binutils-all/strip-sections-1.d new file mode 100644 index 00000000000..76b1dd69c70 --- /dev/null +++ b/binutils/testsuite/binutils-all/strip-sections-1.d @@ -0,0 +1,5 @@ +#PROG: strip +#strip: -g --strip-sections +#readelf: -S + +There are no sections in this file. -- 2.40.1