From patchwork Sat Apr 29 17:07:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Palmer Dabbelt X-Patchwork-Id: 68553 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 1C9A23856DDC for ; Sat, 29 Apr 2023 17:10:48 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by sourceware.org (Postfix) with ESMTPS id ADE2A3858C54 for ; Sat, 29 Apr 2023 17:10:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org ADE2A3858C54 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-pf1-x436.google.com with SMTP id d2e1a72fcca58-63b50a02bffso822871b3a.2 for ; Sat, 29 Apr 2023 10:10:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20221208.gappssmtp.com; s=20221208; t=1682788230; x=1685380230; h=to:from:cc:content-transfer-encoding:mime-version:message-id:date :subject:from:to:cc:subject:date:message-id:reply-to; bh=9J7zB9LLhLyVlgrzhsz1Xb97buoGcYCyHjuZhDcOCuY=; b=3Gt+WhkmFtqNaJyGtu/WaWpiVaBcpuminoZfM9n8Kz52CaWAKPXtuh/END5bmWebqA HebcyRWj/AAHN0b/anNiDvoW1FaFoYz91aP+D8uaibzo4m34I8aUzliWbzchNkYHBx0a Hv//NC/bCak+/xaJUi09uFQXzdKtbOloARI+zxo/V7CE+bQnmLPgSBQ7wae6RTvTIf7C qaPAJwIMGbUzsfaYLUewXTagwOcOONKwHNv6f4C9Nvm1ZXd+9sYghE6kgG/JlI8RMCqz /rF1bkG+tvg6F/A1zb9sU7sHlNLdRzZmp5NnW4AyNe2yaHbuGEVFXlFQO1ukbxF3Symz 8Cpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682788230; x=1685380230; h=to:from:cc:content-transfer-encoding:mime-version:message-id:date :subject:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=9J7zB9LLhLyVlgrzhsz1Xb97buoGcYCyHjuZhDcOCuY=; b=Fhd7bPMtPhNAe/NSgNJdwtid0r+/H706/Cgq6fApIdf+Uj8WDZYAIoRSvJnL7HkTL3 ZLAOrsKK4CgWsGJCJNFH9ni1LoX2lzhrPMt3Q9rErh3TdXU462jyFuHK9f5M3rNFkP8Z MJIjHBeRERgDEoJ3czpJbIwbG5aCJplFxanzlidL0qjlf+NAYNlNJv2XFjXdz0zd8sjN DsqKCXPxC+hFGGaZG/xQ4CZUWR2FpL12gQ2gucVbjRB2SdguEwa+GJZkwYAGb4KiHmUD wYmw90IGTASIh2QnS+JGgTuUMoAUw0a6fP9SN398egtqbmApbEd6X4JkEW4ZP88ReDDF 0vdA== X-Gm-Message-State: AC+VfDz0oRECvkB8EyLLLpeo54JdOdV9txeBGKMkaA4SV8BKVHiXyYb6 yFLo1NdKmsKlNcmdeeIexeOzY8Ltuauff0F2ir4= X-Google-Smtp-Source: ACHHUZ6kuo4XeiuocRLR6k7ktK7nXoOh71uBuJk6rknqxufWmB15cQVq/lOGVHAFQTbPX4LVHVYoFg== X-Received: by 2002:a05:6a00:1949:b0:641:2d72:562 with SMTP id s9-20020a056a00194900b006412d720562mr8565765pfk.13.1682788230469; Sat, 29 Apr 2023 10:10:30 -0700 (PDT) Received: from localhost ([50.221.140.188]) by smtp.gmail.com with ESMTPSA id o8-20020a62f908000000b006260526cf0csm16992106pfh.116.2023.04.29.10.10.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Apr 2023 10:10:30 -0700 (PDT) Subject: [PATCH v2] elf.h: Drop duplicate STO_RISCV_VARIANT_CC, and reorder DT_RISCV_* Date: Sat, 29 Apr 2023 10:07:29 -0700 Message-Id: <20230429170728.17185-1-palmer@rivosinc.com> X-Mailer: git-send-email 2.40.0 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.7 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" I missed the update from last year that included these already, having duplicates breaks the build due to redefinition errors like elf/elf.h:4013: error: macro STO_RISCV_VARIANT_CC redefined elf.h:3941: note: location of previous definition Maskray points out that we've got these slightly out of order when compared to other ports, so I've kept the lower STO_RISCV_VARIANT_CC and moved the DT_RISCV_* symbols down. 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 --- This one's testing, my setup looks OK so I'll hold off a bit before committing it. --- elf/elf.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/elf/elf.h b/elf/elf.h index 4f65b5a32d..dd12f211d4 100644 --- a/elf/elf.h +++ b/elf/elf.h @@ -3933,13 +3933,6 @@ enum #define R_TILEGX_NUM 130 -/* RISC-V specific values for the Dyn d_tag field. */ -#define DT_RISCV_VARIANT_CC (DT_LOPROC + 1) -#define DT_RISCV_NUM 2 - -/* RISC-V specific values for the st_other field. */ -#define STO_RISCV_VARIANT_CC 0x80 - /* RISC-V ELF Flags */ #define EF_RISCV_RVC 0x0001 #define EF_RISCV_FLOAT_ABI 0x0006 @@ -4009,6 +4002,10 @@ enum #define R_RISCV_NUM 59 +/* RISC-V specific values for the Dyn d_tag field. */ +#define DT_RISCV_VARIANT_CC (DT_LOPROC + 1) +#define DT_RISCV_NUM 2 + /* RISC-V specific values for the st_other field. */ #define STO_RISCV_VARIANT_CC 0x80 /* Function uses variant calling convention */