From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) by sourceware.org (Postfix) with ESMTPS id BC14B3858422 for ; Tue, 6 Jun 2023 17:58:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BC14B3858422 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-x434.google.com with SMTP id d2e1a72fcca58-654f8b56807so3780227b3a.1 for ; Tue, 06 Jun 2023 10:58:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686074330; x=1688666330; 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=qAInNxCEDwET4YvhKksv2neyjGYjEGEohzOAVGIoXGI=; b=bx/innV/jPdNwVsoSLk0wg6rrYeCX9O78sTvhVxOiDGod+FoNJAk1n22GCigXAnui0 5IP1h51HiMPK0YFjCB6ZqWFdeGxaFfixLrRihWH2o9KKU07D9yNGIpawGH4r/ExAyKay az/nC32gyYJOUMjJxm6jCcJpXMYJtG3HUYzabHM08orTk4sNmg2JeGk2Vc16Dsmr7hks yYL2qecEhZFgcQwAtj4ONRR13sE0AuABuPa+KAZuJRHdmdR4G0gOmC6auR3EKSfMJZKO 9ol1gyPDpS3bbmumTxWvKqvM05ZZSrhbFRi6FbmstE4n+FcqL1kXfc5Iy/bYkhbGzrXT wsxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686074330; x=1688666330; 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=qAInNxCEDwET4YvhKksv2neyjGYjEGEohzOAVGIoXGI=; b=MA9mjLRFm1KpMRZWBCeVi04ZtY5B6Jd0xTi9u2OXI6XXY388f4nHn+58EtL2qhB/MJ riwPZlSq0wRlYXU8zQl2nZdfpnqfEs5ysgxaaPEl59bkhl4rqcqjQ4POjxU+lMymjlsh 8Mhe60sghrzFZmeaXPJMEdJ/hIJ+1k04QmV3nQjZ4IXhiPlDwTmdSjXk0IuJrlJWNE61 i69FDzzC5IvTLuQ/21OT7J65Wn2Mx0dZVp0X4HExlu61wJvZGI+nLXHOw85KozDG7zH3 8JlNHVC9UH05p7Gg1SZMGyX98kWXAtXS0b4aZ7Mw47q3llBnvrxwPFDJEGFEfAYQoRK/ TxJg== X-Gm-Message-State: AC+VfDzNlNUPDJlHYnHwUGoLLHhZov4Wnd+sZrHNCuoNIMgxXIC/HtVo mfxTnmtu6Ihh0Gr0kKMHUaIr0zLi6PI= X-Google-Smtp-Source: ACHHUZ45HRwgHbKjRux28lIxVNjWLDOoZnimNSozGk4Hr8fqsHFsY7g9YwLkorWGasJCQg3Z/wZcUw== X-Received: by 2002:a17:902:d510:b0:1b1:c90e:b7c0 with SMTP id b16-20020a170902d51000b001b1c90eb7c0mr3005608plg.59.1686074330609; Tue, 06 Jun 2023 10:58:50 -0700 (PDT) Received: from gnu-cfl-3.localdomain ([172.59.160.123]) by smtp.gmail.com with ESMTPSA id bc2-20020a170902930200b001a95c7742bbsm8886746plb.9.2023.06.06.10.58.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jun 2023 10:58:50 -0700 (PDT) Received: from gnu-cfl-3.. (localhost [IPv6:::1]) by gnu-cfl-3.localdomain (Postfix) with ESMTP id 3E04F740378; 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 4/7] ld: Add simple tests for -z nosectionheader Date: Tue, 6 Jun 2023 10:58:43 -0700 Message-Id: <20230606175846.399377-5-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: From: Kaylee Blake 2020-06-06 Kaylee Blake H.J. Lu PR ld/25617 * testsuite/ld-elf/nosectionheader-1.d: New file. * testsuite/ld-elf/nosectionheader-2.d: Likewise. --- ld/testsuite/ld-elf/nosectionheader-1.d | 14 ++++++++++++++ ld/testsuite/ld-elf/nosectionheader-2.d | 4 ++++ 2 files changed, 18 insertions(+) create mode 100644 ld/testsuite/ld-elf/nosectionheader-1.d create mode 100644 ld/testsuite/ld-elf/nosectionheader-2.d diff --git a/ld/testsuite/ld-elf/nosectionheader-1.d b/ld/testsuite/ld-elf/nosectionheader-1.d new file mode 100644 index 00000000000..cbaea669b9a --- /dev/null +++ b/ld/testsuite/ld-elf/nosectionheader-1.d @@ -0,0 +1,14 @@ +#source: start.s +#ld: -z nosectionheader +#readelf: -h -S +#xfail: [uses_genelf] +# These targets don't support -z. + +#... + Start of section headers:[ \t]+0 \(bytes into file\) +#... + Size of section headers:[ \t]+0 \(bytes\) + Number of section headers:[ \t]+0 + Section header string table index:[ \t]+0 + +There are no sections in this file. diff --git a/ld/testsuite/ld-elf/nosectionheader-2.d b/ld/testsuite/ld-elf/nosectionheader-2.d new file mode 100644 index 00000000000..38c344ad697 --- /dev/null +++ b/ld/testsuite/ld-elf/nosectionheader-2.d @@ -0,0 +1,4 @@ +#source: start.s +#ld: -r -z nosectionheader +#error: -r and -z nosectionheader may not be used together +#xfail: [uses_genelf] -- 2.40.1