From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by sourceware.org (Postfix) with ESMTPS id 643AD3882654 for ; Mon, 5 Jun 2023 15:32:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 643AD3882654 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-x42d.google.com with SMTP id d2e1a72fcca58-651f2f38634so4434252b3a.0 for ; Mon, 05 Jun 2023 08:32:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685979147; x=1688571147; 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=3NebJodlTK/aIxR1FEY9wWCkgktAeuE9OS3qU6NmmnY=; b=oIOV71QEU6x6+P1YS7c2kbz1BIFNWsCKd6Cu1xqX4XzjWPc3XD1p8ay+HJNy7KlKFF rs5Ca2OdIx/4D3RXbkwnpXldHMR0iDTF1QDvd2mLVPRyXk1FapiHDxLMxtF+eUiyQdHr 62ROAKCvAp/7ptd0EDtnbYZK3q+T9Lkq51a3JK+UCV9WlhWr5jriOTYvaddY3C3c4/Or 8BXV307l5P5c6YWPvqpK3YKoRcHgl2eGY4fWZrjUt1aKggxZ82sS0a+VpoleUVOFXtKj Ict9WfxXJ/bCTRZBNHbmLpr1T5U+kL2LXtwRPyjTyHXJasgJsa/pUEj5hplatokKodPm grIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685979147; x=1688571147; 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=3NebJodlTK/aIxR1FEY9wWCkgktAeuE9OS3qU6NmmnY=; b=ghk2AoSQHaVfJzqkqMbyViUxJPTDATeCmKt2Tk/QZYM7/prNyB6HdnTYvvpP1q2rJv x2x1XCvdPgwWICd/eRdTcPbDrb8XkuHFvDbezwAc8pURjlIvzV63gBysTVwvBplKflLV +xNaPn2FxbrS60kyeZI3b+UkkKHMnNyYT6fQcTxKegqM0OgTCi7GhuoXrRnXl9RXGaZD 1Unaz26rLOej3OzWCX8yzY7ElgqRJw8YVDdi/HQy8Ncp3tsXtugYcppWlrb7xd0irqfO jg6IX0IAfnBOYuZWIjzp4ZtavmDx9xYJh5qVOHNfbnxImFsadRWrVSSPHhdHBFuaV6qm gHyQ== X-Gm-Message-State: AC+VfDyJR8HEclbnqFJg1cYWpfDS5/g0KdEPva6DI+MxLkAF8GPmQGoS aQlzzrunKmoCESF7gNFGKzujreURyh8= X-Google-Smtp-Source: ACHHUZ7mV2jPvHoYmF86liyJLiElxDccKVRSQY/upP7UPjU1ZtyGe5GMZvH4pSZXVT84O9EwFbgkhw== X-Received: by 2002:a05:6a21:2c87:b0:10b:3b0d:b05c with SMTP id ua7-20020a056a212c8700b0010b3b0db05cmr6789272pzb.28.1685979147405; Mon, 05 Jun 2023 08:32:27 -0700 (PDT) Received: from gnu-cfl-3.localdomain ([172.59.160.123]) by smtp.gmail.com with ESMTPSA id p13-20020a635b0d000000b0050f93a3586fsm5890430pgb.37.2023.06.05.08.32.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Jun 2023 08:32:27 -0700 (PDT) Received: from gnu-cfl-3.. (localhost [IPv6:::1]) by gnu-cfl-3.localdomain (Postfix) with ESMTP id 78AA074032C; Mon, 5 Jun 2023 08:32:25 -0700 (PDT) From: "H.J. Lu" To: binutils@sourceware.org Cc: Alan Modra , Kaylee Blake Subject: [PATCH v3 5/7] binutils: Add a --strip-section-headers test Date: Mon, 5 Jun 2023 08:32:20 -0700 Message-Id: <20230605153222.1728119-6-hjl.tools@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230605153222.1728119-1-hjl.tools@gmail.com> References: <20230605153222.1728119-1-hjl.tools@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3025.1 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-section-headers-1. * testsuite/binutils-all/strip-section-headers-1.d: New file. --- binutils/testsuite/binutils-all/objcopy.exp | 5 +++++ binutils/testsuite/binutils-all/strip-section-headers-1.d | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 binutils/testsuite/binutils-all/strip-section-headers-1.d diff --git a/binutils/testsuite/binutils-all/objcopy.exp b/binutils/testsuite/binutils-all/objcopy.exp index 361e430f119..41add0fecda 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-section-headers + run_dump_test "strip-section-headers-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-section-headers-1.d b/binutils/testsuite/binutils-all/strip-section-headers-1.d new file mode 100644 index 00000000000..dc249bba779 --- /dev/null +++ b/binutils/testsuite/binutils-all/strip-section-headers-1.d @@ -0,0 +1,5 @@ +#PROG: strip +#strip: -g --strip-section-headers +#readelf: -S + +There are no sections in this file. -- 2.40.1