From patchwork Mon May 1 23:47:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Palmer Dabbelt X-Patchwork-Id: 68613 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E0F7E3856DFE for ; Mon, 1 May 2023 23:48:44 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by sourceware.org (Postfix) with ESMTPS id 478503858D28 for ; Mon, 1 May 2023 23:48:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 478503858D28 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivosinc.com Received: by mail-pj1-x102a.google.com with SMTP id 98e67ed59e1d1-247048f86c7so2156286a91.2 for ; Mon, 01 May 2023 16:48:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20221208.gappssmtp.com; s=20221208; t=1682984908; x=1685576908; h=to:from:cc:content-transfer-encoding:mime-version:references :in-reply-to:message-id:date:subject:from:to:cc:subject:date :message-id:reply-to; bh=AMW2sRhqcAQfyBSWZe5LIpuc8/DKNNYwTj8z6bHy9tk=; b=u35fSfAXCxLf3HCgWyaWTL6W7APjYDhvClq2uEo7cfj1ngLqxPJtqLudW+GbK8YoCD tcoQG5L0scW+ZkauidIhpDc3rQ1WzqkkaztT1//JsRWzPfkYb76IXDMfuoQzR2fpEPur XeHAOrsKmW+iJoR36+J8ijb+7wVLAbJcfoScwtvn5Jgy/qIUue+BK6qfTFh0niw6hgdt 9u5lQaEO8+TX+8ugCbeoMvV3pMH79tco4KgpxgYa9BKfEMECgtI5/e6OjOeMAYiFdetd D1iuFvEguS549aI7lRTqSiKotO17Lf58i8z/j8wxLVTWa8wr9In+sIy+kVQ02efDsv2N W3CQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682984908; x=1685576908; h=to:from:cc:content-transfer-encoding:mime-version:references :in-reply-to:message-id:date:subject:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AMW2sRhqcAQfyBSWZe5LIpuc8/DKNNYwTj8z6bHy9tk=; b=e3TLJ4vMqem7qA4XIWXc4sA2aaFPNxGzqmBmlCsblDMg3Wz2O/mZ+CGWr9XsX82oui kTHdHxroDF1xewyzCX9P51bh85CGd2mDUroY9pt0caJ65YSDB2auXZqXrSuYI7xE1Cjl nkfoEuSZ7M0sN9qQGdIf7TFuyNr2+/CITIQeRDqS5QuA38hCtxqWL78NrwZonpJZVAkc VnJCnOLdD7egik1ptK6Dq0d4YjKdHEhMGN2boPS2KKWlItbT6NQrn6NDNVj6X5RbSmgD SJVx+UMU7xy7OjRf+hb+/ga3/Oxllas8sZUhPgVbIUAjLBywM77uZfW06L9GUhPseUH4 H6dQ== X-Gm-Message-State: AC+VfDzWupCeqVwUFjhIGxg/LFHipZBCOFTaF87Rj9PaU3sa+Rjx/ehY KqjqG3ii4RvxYkSgTbPb0mcya9ENHun3c+1yrVw= X-Google-Smtp-Source: ACHHUZ7qmcphZcrAvzK5K9psDUBqNxGhKhl0awd9t/35pFm7W4OArba7PJWRgaSblKRfo8QW8DeWvQ== X-Received: by 2002:a17:90b:895:b0:24e:14ad:24c7 with SMTP id bj21-20020a17090b089500b0024e14ad24c7mr2676436pjb.13.1682984908077; Mon, 01 May 2023 16:48:28 -0700 (PDT) Received: from localhost ([50.221.140.188]) by smtp.gmail.com with ESMTPSA id t20-20020a17090aba9400b0023b4d4ca3a9sm6358859pjr.50.2023.05.01.16.48.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 May 2023 16:48:27 -0700 (PDT) Subject: [PATCH v3 1/6] elf.h, scripts: Don't error on duplicate DT_RISCV_NUM Date: Mon, 1 May 2023 16:47:34 -0700 Message-Id: <20230501234739.7264-2-palmer@rivosinc.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230501234739.7264-1-palmer@rivosinc.com> References: <20230501234739.7264-1-palmer@rivosinc.com> MIME-Version: 1.0 Cc: libc-alpha@sourceware.org, Palmer Dabbelt From: Palmer Dabbelt To: maskray@google.com, joseph@codesourcery.com X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, 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 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" DT_RISCV_NUM is just the count of d_tag entries, so it's OK if it has the same value as some other entry. Other architectures allow this duplication, do so for RISC-V as well. Reported-by: Joseph S. Myers Fixes: 117e8b341c ("riscv: Resolve symbols directly for symbols with STO_RISCV_VARIANT_CC.") Link: https://inbox.sourceware.org/libc-alpha/mhng-0d9fb5a0-63fa-4b02-8029-7c20232f39ee@palmer-ri-x1c9/T/#t Signed-off-by: Palmer Dabbelt --- elf/tst-glibcelf.py | 1 + scripts/glibcelf.py | 1 + 2 files changed, 2 insertions(+) diff --git a/elf/tst-glibcelf.py b/elf/tst-glibcelf.py index 6142ca28ae..41d1b18022 100644 --- a/elf/tst-glibcelf.py +++ b/elf/tst-glibcelf.py @@ -182,6 +182,7 @@ DT_NUM DT_PPC64_NUM DT_PPC_NUM DT_PROCNUM +DT_RISCV_NUM DT_SPARC_NUM DT_VALNUM DT_VALRNGHI diff --git a/scripts/glibcelf.py b/scripts/glibcelf.py index 6f48eee129..9d36ea60cd 100644 --- a/scripts/glibcelf.py +++ b/scripts/glibcelf.py @@ -450,6 +450,7 @@ DT_IA_64_NUM DT_MIPS_NUM DT_PPC_NUM DT_PPC64_NUM +DT_RISCV_NUM DT_SPARC_NUM '''.strip().split() _register_elf_h(DtAARCH64, prefix='DT_AARCH64_', skip=_dt_skip, parent=Dt)