From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oo1-xc36.google.com (mail-oo1-xc36.google.com [IPv6:2607:f8b0:4864:20::c36]) by sourceware.org (Postfix) with ESMTPS id 263D93857806 for ; Tue, 6 Jun 2023 17:59:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 263D93857806 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-oo1-xc36.google.com with SMTP id 006d021491bc7-558565cc58fso4894321eaf.0 for ; Tue, 06 Jun 2023 10:59:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686074339; x=1688666339; 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=WmLeNY+2fK17GwoiBP8NZDydFpI6AJpiF7p5yGbPF40=; b=j24l50mRL4feRGCA5o0sa/laHqhTqy6TFc+uO/ZWAfCr8uNcERGjOQC49wGGm8ukGL pMT/yWTiT7MsOIr7IUPwZbfbQHtiSQSdykBATaHSMFeHE49/5spUfb5vwUTOGxrCSpZ0 8+uiGcyDlWAEkxt/o9gQShjEEgz1t8pbW0JgLWet6K/9tcBO7rp+52igw3qq3qYwk/Xw 2b7BjGlJvyF/CgtfhyFJQQhNimIYrRyPGkDO9bMJpDC6CzNYHCJnfBOkVS1tVDvvK5OD FiI4z47vVURMD7PLHAPxPK1wlVYNgAoH5oK30WYE3HG0b99BZHAzkxSFDfgRJFX3qgLN J3BQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686074339; x=1688666339; 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=WmLeNY+2fK17GwoiBP8NZDydFpI6AJpiF7p5yGbPF40=; b=KpIN1xKfyBlCowTbsF51DlUZeKSIA8eMMpd8BU8O8KC70V5yYko5WylrLLu7o1jAwM Hi9l0CA3FW9fo6cFOiMEjkChV7oGXydD6SODNbA/RsfTDb00n73pM93RJrh1+pMY9RJr 4sTva1YCiTNSbaHLeEMpeLMz3Ay2icDTGeQeRHVfptqHBZLCaWDUsV5qFVXwTQqcgOf7 fSSpNc0qAPTbRSnlDaZPcfa5Kx/MI9aXqfdqusrMCIvbX2dj7IkjluQA18bEOeU3YNHo 1270gswQbk63QCrZNFvQNa6EMuoCaEi9wY+m/qPkHVAC6D6aPVO8fTsjPMHiY5Tq28vd fjFA== X-Gm-Message-State: AC+VfDxXhMpWekW4wELpEz7P5qf/7YRIBxxjTRmxOedZ7QbktswJ5xQO STVabaQ1OafgIFK7QKF6n8g= X-Google-Smtp-Source: ACHHUZ4JDTRPMC9QoKbKcSLGplUDYCzOvScUMqSK2Y7YrC3hOXFP9+OPxGXvc0y1cc+dgC6FPRIKIA== X-Received: by 2002:a05:6359:2a0:b0:129:c394:ef62 with SMTP id ek32-20020a05635902a000b00129c394ef62mr488835rwb.16.1686074339335; Tue, 06 Jun 2023 10:58:59 -0700 (PDT) Received: from gnu-cfl-3.localdomain ([172.59.160.123]) by smtp.gmail.com with ESMTPSA id g13-20020a17090a290d00b00256799877ffsm8411113pjd.47.2023.06.06.10.58.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jun 2023 10:58:59 -0700 (PDT) Received: from gnu-cfl-3.. (localhost [IPv6:::1]) by gnu-cfl-3.localdomain (Postfix) with ESMTP id 48F6674037A; Tue, 6 Jun 2023 10:58:49 -0700 (PDT) From: "H.J. Lu" To: binutils@sourceware.org Cc: Alan Modra , Florian Weimer , Kaylee Blake Subject: [PATCH v4 5/7] binutils: Add a --strip-section-headers test Date: Tue, 6 Jun 2023 10:58:44 -0700 Message-Id: <20230606175846.399377-6-hjl.tools@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230606175846.399377-1-hjl.tools@gmail.com> References: <20230606175846.399377-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 f6d4d1b839e..c70a26ca42e 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