From patchwork Tue Apr 16 09:45:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Schwab X-Patchwork-Id: 1924070 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=lsE6Ae+x; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=PKYuyXY3; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=lsE6Ae+x; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=PKYuyXY3; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=patchwork.ozlabs.org) Received: from server2.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 ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VJfLs4VDBz1yXv for ; Tue, 16 Apr 2024 19:46:29 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0C4B53858D37 for ; Tue, 16 Apr 2024 09:46:27 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by sourceware.org (Postfix) with ESMTPS id C03053858D35 for ; Tue, 16 Apr 2024 09:46:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C03053858D35 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C03053858D35 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713260771; cv=none; b=u4NYyks5KszseNtG2fcaYNh20LP+IgAV+k8rCrYy+7Yl0e00jH56CS66LL8uSfuKRVQJ42exhhu/K81t3S8+vmOPLGuOlSXKxrOSOzkz1P5XSPxMByVdAQVj5EVVB2vUUkGz6DqFFz57ZO3ahV4k8Fw9x+LYRX5DeIuXXyN/Ig0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713260771; c=relaxed/simple; bh=m/ZBSS39nEpI9x2tWZYqz12fe0WF4nqfBm2WxZtwkPU=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature:From: To:Subject:Date:Message-ID:MIME-Version; b=BXEYX9e52ue1PdJ9KDkJaiCX1t8yDDDm24EdEaEMzZrmDxyz6ep5TCnF0i1RlHwEJGt4oXqAff6+0GGasnJpFTyS6mvA00hn8u5ID3+Tfn2gRoKBn6Y9h3RZvovLKnzssGO+JQc6ZmTyapV05Uq7pCL/4gf6NhU7aEHUUh0ETXQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from hawking.nue2.suse.org (unknown [10.168.4.11]) by smtp-out1.suse.de (Postfix) with ESMTP id A88DE379EE for ; Tue, 16 Apr 2024 09:46:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1713260767; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type; bh=9CoyE9uSrJISFrjYfN/cg2n8I9XjagGf/JC0aXDUAr0=; b=lsE6Ae+xH7ZDRFkwzYanMJoLfR7IkrnLGVZnj7856FOOlBoUylh0BqhpSjljpj0qk8EmEY yxUBvVzZeYR65AbDhA1axbBFrRIkDoMC5X82rPDVpWfAeqFMLYCo0zwMXgG39p/QkDN7KQ jxxXEX12Fd2sKHN7JJSfvc7ZD7tEukI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1713260767; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type; bh=9CoyE9uSrJISFrjYfN/cg2n8I9XjagGf/JC0aXDUAr0=; b=PKYuyXY3GLS+tJ70XB/1BlXNqxnNO5kCTtndNoisnu/JD4KY8uDqHa7lDFmpEqzKpFWKE2 T5kybpeYaH2+zaCw== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1713260767; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type; bh=9CoyE9uSrJISFrjYfN/cg2n8I9XjagGf/JC0aXDUAr0=; b=lsE6Ae+xH7ZDRFkwzYanMJoLfR7IkrnLGVZnj7856FOOlBoUylh0BqhpSjljpj0qk8EmEY yxUBvVzZeYR65AbDhA1axbBFrRIkDoMC5X82rPDVpWfAeqFMLYCo0zwMXgG39p/QkDN7KQ jxxXEX12Fd2sKHN7JJSfvc7ZD7tEukI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1713260767; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type; bh=9CoyE9uSrJISFrjYfN/cg2n8I9XjagGf/JC0aXDUAr0=; b=PKYuyXY3GLS+tJ70XB/1BlXNqxnNO5kCTtndNoisnu/JD4KY8uDqHa7lDFmpEqzKpFWKE2 T5kybpeYaH2+zaCw== Received: by hawking.nue2.suse.org (Postfix, from userid 17005) id 973704A0377; Tue, 16 Apr 2024 11:45:37 +0200 (CEST) From: Andreas Schwab To: libc-alpha@sourceware.org Subject: [PATCH v2] Update RISC-V relocations X-Yow: It's strange, but I'm only TRULY ALIVE when I'm covered in POLKA DOTS and TACO SAUCE... Date: Tue, 16 Apr 2024 11:45:37 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 X-Spam-Score: -4.20 X-Spam-Level: X-Spamd-Result: default: False [-4.20 / 50.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.20)[-0.999]; MIME_GOOD(-0.10)[text/plain]; RCVD_NO_TLS_LAST(0.10)[]; ARC_NA(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_ONE(0.00)[1]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; TO_DN_NONE(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email] X-Spam-Status: No, score=-9.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP 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.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org This updates the list of RISC-V relocations from the ELF psABI as of Apr 2024. It removes binutils-internal only relocations that were never part of actual object files. The GNU_VTINHERIT and GNU_VTENTRY relocations were never used because the corresponding GCC option -fvtable-gc was never supported on RISC-V. --- v2: Remove GPREL relocations. They were recently removed again from the ABI, as they are only supposed to be linker-internal. --- elf/elf.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/elf/elf.h b/elf/elf.h index 55b2e87860..6a4e1d7512 100644 --- a/elf/elf.h +++ b/elf/elf.h @@ -4080,6 +4080,7 @@ enum #define R_RISCV_TLS_DTPREL64 9 #define R_RISCV_TLS_TPREL32 10 #define R_RISCV_TLS_TPREL64 11 +#define R_RISCV_TLSDESC 12 #define R_RISCV_BRANCH 16 #define R_RISCV_JAL 17 #define R_RISCV_CALL 18 @@ -4105,16 +4106,10 @@ enum #define R_RISCV_SUB16 38 #define R_RISCV_SUB32 39 #define R_RISCV_SUB64 40 -#define R_RISCV_GNU_VTINHERIT 41 -#define R_RISCV_GNU_VTENTRY 42 +#define R_RISCV_GOT32_PCREL 41 #define R_RISCV_ALIGN 43 #define R_RISCV_RVC_BRANCH 44 #define R_RISCV_RVC_JUMP 45 -#define R_RISCV_RVC_LUI 46 -#define R_RISCV_GPREL_I 47 -#define R_RISCV_GPREL_S 48 -#define R_RISCV_TPREL_I 49 -#define R_RISCV_TPREL_S 50 #define R_RISCV_RELAX 51 #define R_RISCV_SUB6 52 #define R_RISCV_SET6 53 @@ -4126,8 +4121,12 @@ enum #define R_RISCV_PLT32 59 #define R_RISCV_SET_ULEB128 60 #define R_RISCV_SUB_ULEB128 61 +#define R_RISCV_TLSDESC_HI20 62 +#define R_RISCV_TLSDESC_LOAD_LO12 63 +#define R_RISCV_TLSDESC_ADD_LO12 64 +#define R_RISCV_TLSDESC_CALL 65 -#define R_RISCV_NUM 62 +#define R_RISCV_NUM 66 /* RISC-V specific values for the st_other field. */ #define STO_RISCV_VARIANT_CC 0x80 /* Function uses variant calling