From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-00230701.pphosted.com (mx0b-00230701.pphosted.com [148.163.158.9]) by sourceware.org (Postfix) with ESMTPS id DCAF7384F4AD for ; Fri, 18 Nov 2022 13:15:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DCAF7384F4AD Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=synopsys.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=synopsys.com Received: from pps.filterd (m0098572.ppops.net [127.0.0.1]) by mx0b-00230701.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2AI6mflP032576; Fri, 18 Nov 2022 05:15:51 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=synopsys.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding; s=pfptdkimsnps; bh=T7qMYlNn5RQjPPE+xeGn7OqGAItZQ6vrd2V35tRxbGI=; b=R1MHJk7FdHJBO33mXNQ5hWHnd0/aStFs6rEhYF8FDifo8/A35pnRjNAIo7RiuCj+zO4S uv13zIYG3lv+8FkG5kLQnwBbOOe+QsDoFAb/ZcyOaL7AwzEHH5hJtKK/ZHsn+QXC3tv3 6OzNjwgKkWBtTRyH/ZZkmA/ItzoC8sLpIHVSMC+EMOkrNsRZ6EFbkKWhKJuu9D0DtueJ rxVilS6BpgcffZrcrfdwm2u4JZ0qn3ZULvapQCTJ9Yq/aR7lyxvbNr3P6U/gplAyZlwJ u9Rx78w2ZLWcTf8v26RvSaavz7yRDJHuzxX7gWPZOeEZFjWbhyFH7yqZUg0B0X+HYiY/ RA== Received: from smtprelay-out1.synopsys.com (smtprelay-out1.synopsys.com [149.117.73.133]) by mx0b-00230701.pphosted.com (PPS) with ESMTPS id 3kx0mutg35-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 18 Nov 2022 05:15:51 -0800 Received: from mailhost.synopsys.com (mdc-mailhost2.synopsys.com [10.225.0.210]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "mailhost.synopsys.com", Issuer "SNPSica2" (verified OK)) by smtprelay-out1.synopsys.com (Postfix) with ESMTPS id 0CCD540141; Fri, 18 Nov 2022 13:15:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1668777350; bh=v2ovkW8ptl8IEjr4gG2qfAdRdlp6FA5vXuxgo11E13s=; h=From:To:Cc:Subject:Date:From; b=SkSW+GKXE2qPnc9fMxzfGwh8WFXa8fwtDhkV68K9pmUus+iLl0kdRjpzt8DP8+y+N PVqVKCN8uw7ztpbCiDxUWsytaE2JsL3S08cRHpqk6xidBe4axvvYGagvLm454Slzkr 3N71ugTEPNORca3pPo3Er4mMvSN957fODZTdzY7+WlYHRLGseLQGXbu5cKNLaKAnuQ xN4MuKZwYcozhVjzTF0W2Q4SunKrOVc7nk9f+12Gfqmr+rzYizPNNAW5thGUiJM/6M rhxs2/gMdEvcpP2tlHgcIks0hAm9K5xv59sB8tnDNtSMhQvvg5FeKdQOQkGHOfiQSx I1aTHeRA+WrPA== Received: from atlantis.internal.synopsys.com (unknown [10.225.29.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client did not present a certificate) by mailhost.synopsys.com (Postfix) with ESMTPSA id 7392AA005E; Fri, 18 Nov 2022 13:15:46 +0000 (UTC) X-SNPS-Relay: synopsys.com From: Shahab Vahedi To: libc-alpha@sourceware.org Cc: Shahab Vahedi , Vineet Gupta , Claudiu Zissulescu Subject: [PATCH] ARC: update definitions in elf/elf.h Date: Fri, 18 Nov 2022 14:15:42 +0100 Message-Id: <20221118131542.23188-1-shahab@synopsys.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Proofpoint-ORIG-GUID: 07SX7YTV9szcD-eR1Fv6054T2Fj5JCiU X-Proofpoint-GUID: 07SX7YTV9szcD-eR1Fv6054T2Fj5JCiU X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-18_02,2022-11-18_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_active_cloned_notspam policy=outbound_active_cloned score=0 phishscore=0 lowpriorityscore=0 malwarescore=0 impostorscore=0 bulkscore=0 mlxscore=0 clxscore=1011 mlxlogscore=759 priorityscore=1501 suspectscore=0 spamscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211180080 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_NONE,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 List-Id: While porting ARCv2 to elfutils [1], it was brought up that the necessary changes to the project's libelf/elf.h must come from glibc, because they sync it from glibc [2]. Therefore, this patch is to update ARC entries in elf/elf.h. The majority of the update is about adding new definitions, specially for the relocations. However, there is one rename, one deletion, and one change: - R_ARC_JUMP_SLOT renamed to R_ARC_JMP_SLOT to match binutils. - R_ARC_B26 removed because it is unused and deprecated. - R_ARC_TLS_DTPOFF_S9 changed from 0x4a to the correct value 0x49. [1] https://sourceware.org/pipermail/elfutils-devel/2022q4/005530.html [2] https://sourceware.org/pipermail/elfutils-devel/2022q4/005548.html Signed-off-by: Shahab Vahedi --- elf/elf.h | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/elf/elf.h b/elf/elf.h index 920e6891e6..dfe5f79036 100644 --- a/elf/elf.h +++ b/elf/elf.h @@ -4160,13 +4160,23 @@ enum #define R_LARCH_GNU_VTENTRY 58 +/* ARC specific declarations. */ + +/* Processor specific flags for the Ehdr e_flags field. */ +#define EF_ARC_MACH_MSK 0x000000ff +#define EF_ARC_OSABI_MSK 0x00000f00 +#define EF_ARC_ALL_MSK (EF_ARC_MACH_MSK | EF_ARC_OSABI_MSK) + +/* Processor specific values for the Shdr sh_type field. */ +#define SHT_ARC_ATTRIBUTES (SHT_LOPROC + 1) /* ARC attributes section. */ + /* ARCompact/ARCv2 specific relocs. */ #define R_ARC_NONE 0x0 #define R_ARC_8 0x1 #define R_ARC_16 0x2 #define R_ARC_24 0x3 #define R_ARC_32 0x4 -#define R_ARC_B26 0x5 + #define R_ARC_B22_PCREL 0x6 #define R_ARC_H30 0x7 #define R_ARC_N8 0x8 @@ -4206,16 +4216,23 @@ enum #define R_ARC_SECTOFF_ME_2 0x2A #define R_ARC_SECTOFF_1 0x2B #define R_ARC_SECTOFF_2 0x2C +#define R_ARC_SDA_12 0x2D +#define R_ARC_SDA16_ST2 0x30 +#define R_ARC_32_PCREL 0x31 #define R_ARC_PC32 0x32 #define R_ARC_GOTPC32 0x33 #define R_ARC_PLT32 0x34 #define R_ARC_COPY 0x35 #define R_ARC_GLOB_DAT 0x36 -#define R_ARC_JUMP_SLOT 0x37 +#define R_ARC_JMP_SLOT 0x37 #define R_ARC_RELATIVE 0x38 #define R_ARC_GOTOFF 0x39 #define R_ARC_GOTPC 0x3A #define R_ARC_GOT32 0x3B +#define R_ARC_S21W_PCREL_PLT 0x3C +#define R_ARC_S25H_PCREL_PLT 0x3D + +#define R_ARC_JLI_SECTOFF 0x3F #define R_ARC_TLS_DTPMOD 0x42 #define R_ARC_TLS_DTPOFF 0x43 @@ -4224,9 +4241,12 @@ enum #define R_ARC_TLS_GD_LD 0x46 #define R_ARC_TLS_GD_CALL 0x47 #define R_ARC_TLS_IE_GOT 0x48 -#define R_ARC_TLS_DTPOFF_S9 0x4a -#define R_ARC_TLS_LE_S9 0x4a -#define R_ARC_TLS_LE_32 0x4b +#define R_ARC_TLS_DTPOFF_S9 0x49 +#define R_ARC_TLS_LE_S9 0x4A +#define R_ARC_TLS_LE_32 0x4B +#define R_ARC_S25W_PCREL_PLT 0x4C +#define R_ARC_S21H_PCREL_PLT 0x4D +#define R_ARC_NPS_CMEM16 0x4E /* OpenRISC 1000 specific relocs. */ #define R_OR1K_NONE 0 -- 2.38.1