From patchwork Mon May 16 19:59:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 1631823 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=cP4T9BT+; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4L298c3yGZz9s5V for ; Tue, 17 May 2022 06:00:16 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 240E9385C41E for ; Mon, 16 May 2022 20:00:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 240E9385C41E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1652731214; bh=/qhkW8S/3i3S0+mSwc4XBIBujuXfvN2hJrryyrPX3O4=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=cP4T9BT+MSpkI35Z/hnDgKcJHv2QTE36g7f6lNxVufVFVd+2eYKnvpFgUhyl2gWQi nnBW0w++NbwcmoPnAWr9Gzq2u/6/JJ5r+LvNaPM5xWtY/MWVf2gQGD1+ojjUYMv3Fk yMpsyDe6pbBtu2XO1QRqQgoFx8yJAcWYY0cWFGpw= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id B06E43858C51 for ; Mon, 16 May 2022 19:59:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B06E43858C51 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-617-oDDI-2QYPgyNVmpQlX87FA-1; Mon, 16 May 2022 15:59:58 -0400 X-MC-Unique: oDDI-2QYPgyNVmpQlX87FA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 06494811E75 for ; Mon, 16 May 2022 19:59:58 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.193.27]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5E72240D1B98 for ; Mon, 16 May 2022 19:59:57 +0000 (UTC) To: libc-alpha@sourceware.org Subject: [PATCH] scripts/glibcelf.py: Add *T_RISCV_* constants Date: Mon, 16 May 2022 21:59:55 +0200 Message-ID: <87ilq5p7t0.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, 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: , X-Patchwork-Original-From: Florian Weimer via Libc-alpha From: Florian Weimer Reply-To: Florian Weimer Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Sender: "Libc-alpha" SHT_RISCV_ATTRIBUTES, PT_RISCV_ATTRIBUTES, DT_RISCV_VARIANT_CC were added in commit 0b6c6750732483b4d59c2fcb45484079cd84157d ("Update RISC-V specific ELF definitions"). This caused the elf/tst-glibcelf consistency check to fail. Reviewed-by: Adhemerval Zanella --- scripts/glibcelf.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/scripts/glibcelf.py b/scripts/glibcelf.py index f847b36c55..07bef94043 100644 --- a/scripts/glibcelf.py +++ b/scripts/glibcelf.py @@ -385,6 +385,10 @@ class ShtPARISC(enum.Enum): SHT_PARISC_UNWIND = 0x70000001 SHT_PARISC_DOC = 0x70000002 +class ShtRISCV(enum.Enum): + """Supplemental SHT_* constants for EM_RISCV.""" + SHT_RISCV_ATTRIBUTES = 0x70000003 + class Pf(enum.IntFlag): """Program header flags. Type of Phdr.p_flags values.""" PF_X = 1 @@ -558,6 +562,10 @@ class PtPARISC(enum.Enum): PT_PARISC_ARCHEXT = 0x70000000 PT_PARISC_UNWIND = 0x70000001 +class PtRISCV(enum.Enum): + """Supplemental PT_* constants for EM_RISCV.""" + PT_RISCV_ATTRIBUTES = 0x70000003 + class Dt(_OpenIntEnum): """ELF dynamic segment tags. Type of Dyn.d_val.""" DT_NULL = 0 @@ -710,6 +718,10 @@ class DtPPC64(enum.Enum): DT_PPC64_OPDSZ = 0x70000002 DT_PPC64_OPT = 0x70000003 +class DtRISCV(enum.Enum): + """Supplemental DT_* constants for EM_RISCV.""" + DT_RISCV_VARIANT_CC = 0x70000001 + class DtSPARC(enum.Enum): """Supplemental DT_* constants for EM_SPARC.""" DT_SPARC_REGISTER = 0x70000001