From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12188 invoked by alias); 12 Jul 2019 22:10:35 -0000 Mailing-List: contact elfutils-devel-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: elfutils-devel-owner@sourceware.org Received: (qmail 12172 invoked by uid 89); 12 Jul 2019 22:10:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.100.3 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-19.1 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_SHORT,SPF_PASS,UPPERCASE_50_75 autolearn=ham version=3.3.1 spammy=deliberately, co.,ltd, coltd, hangzhou X-Spam-Status: No, score=-19.1 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_SHORT,SPF_PASS,UPPERCASE_50_75 autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on sourceware.org X-Spam-Level: X-HELO: gnu.wildebeest.org Received: from wildebeest.demon.nl (HELO gnu.wildebeest.org) (212.238.236.112) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 12 Jul 2019 22:10:33 +0000 Received: from tarox.wildebeest.org (tarox.wildebeest.org [172.31.17.39]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id 41717302BBF2; Sat, 13 Jul 2019 00:10:31 +0200 (CEST) Received: by tarox.wildebeest.org (Postfix, from userid 1000) id F362E413CC0E; Sat, 13 Jul 2019 00:10:30 +0200 (CEST) Message-ID: <7d5d153ecbcee44414a72af4555c68b3e086be79.camel@klomp.org> Subject: Re: [[RESEND & PING]PATCH V3 1/1] Add backend support for C-SKY From: Mark Wielaard To: Mao Han , elfutils-devel@sourceware.org Date: Fri, 12 Jul 2019 22:10:00 -0000 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Evolution 3.28.5 (3.28.5-2.el7) Mime-Version: 1.0 X-Spam-Flag: NO X-IsSubscribed: yes X-SW-Source: 2019-q3/txt/msg00048.txt.bz2 On Mon, 2019-06-03 at 16:16 +0800, Mao Han wrote: > diff --git a/backends/csky_reloc.def b/backends/csky_reloc.def > new file mode 100644 > index 0000000..1108f0c > --- /dev/null > +++ b/backends/csky_reloc.def > @@ -0,0 +1,86 @@ > +/* List the relocation types for csky. -*- C -*- > + Copyright (C) 2019 Hangzhou C-SKY Microsystems co.,ltd. > + This file is part of elfutils. > + > + This file is free software; you can redistribute it and/or modify > + it under the terms of either > + > + * the GNU Lesser General Public License as published by the Free > + Software Foundation; either version 3 of the License, or (at > + your option) any later version > + > + or > + > + * the GNU General Public License as published by the Free > + Software Foundation; either version 2 of the License, or (at > + your option) any later version > + > + or both in parallel, as here. > + > + elfutils is distributed in the hope that it will be useful, but > + WITHOUT ANY WARRANTY; without even the implied warranty of > + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > + General Public License for more details. > + > + You should have received copies of the GNU General Public License and > + the GNU Lesser General Public License along with this program. If > + not, see . */ > + > +/* NAME, REL|EXEC|DYN */ > + > + > +RELOC_TYPE (NONE, REL|EXEC|DYN) > +RELOC_TYPE (ADDR32, REL|EXEC|DYN) OK. > +RELOC_TYPE (PCRELIMM8BY4, REL) > +RELOC_TYPE (PCRELIMM11BY2, REL) Do we want these two? They seem to be v1 only. > +RELOC_TYPE (PCREL32, REL|DYN) This is probably wanted, but the CPU ABI document has it listed as ??. > +RELOC_TYPE (PCRELJSR_IMM11BY2, REL) Also v1 only? > +RELOC_TYPE (RELATIVE, EXEC|DYN) > +RELOC_TYPE (COPY, EXEC|DYN) > +RELOC_TYPE (GLOB_DAT, EXEC|DYN) > +RELOC_TYPE (JUMP_SLOT, EXEC|DYN) OK. > +RELOC_TYPE (GOTOFF, REL) > +RELOC_TYPE (GOTPC, REL) > +RELOC_TYPE (GOT32, REL) > +RELOC_TYPE (PLT32, REL) > +RELOC_TYPE (ADDRGOT, REL) > +RELOC_TYPE (ADDRPLT, REL) v1 only? > +RELOC_TYPE (PCREL_IMM26BY2, REL) > +RELOC_TYPE (PCREL_IMM16BY2, REL) > +RELOC_TYPE (PCREL_IMM16BY4, REL) > +RELOC_TYPE (PCREL_IMM10BY2, REL) > +RELOC_TYPE (PCREL_IMM10BY4, REL) > +RELOC_TYPE (ADDR_HI16, REL|DYN) > +RELOC_TYPE (ADDR_LO16, REL|DYN) > +RELOC_TYPE (GOTPC_HI16, REL) > +RELOC_TYPE (GOTPC_LO16, REL) > +RELOC_TYPE (GOTOFF_HI16, REL) > +RELOC_TYPE (GOTOFF_LO16, REL) > +RELOC_TYPE (GOT12, REL) > +RELOC_TYPE (GOT_HI16, REL) > +RELOC_TYPE (GOT_LO16, REL) > +RELOC_TYPE (PLT12, REL) > +RELOC_TYPE (PLT_HI16, REL) > +RELOC_TYPE (PLT_LO16, REL) > +RELOC_TYPE (ADDRGOT_HI16, REL) > +RELOC_TYPE (ADDRGOT_LO16, REL) > +RELOC_TYPE (ADDRPLT_HI16, REL) > +RELOC_TYPE (ADDRPLT_LO16, REL) > +RELOC_TYPE (PCREL_JSR_IMM26BY2, REL|DYN) > +RELOC_TYPE (TOFFSET_LO16, REL) > +RELOC_TYPE (DOFFSET_LO16, REL) > +RELOC_TYPE (PCREL_IMM18BY2, REL) > +RELOC_TYPE (DOFFSET_IMM18, REL) > +RELOC_TYPE (DOFFSET_IMM18BY2, REL) > +RELOC_TYPE (DOFFSET_IMM18BY4, REL) R_CKCORE_GOTOFF_IMM18 is missing, but it is also missing in elf.h. > +RELOC_TYPE (GOT_IMM18BY4, REL) > +RELOC_TYPE (PLT_IMM18BY4, REL) R_CKCORE_PCREL_IMM7BY4 missing? > +RELOC_TYPE (PCREL_IMM7BY4, REL) > +RELOC_TYPE (TLS_LE32, REL) > +RELOC_TYPE (TLS_IE32, REL) > +RELOC_TYPE (TLS_GD32, REL) > +RELOC_TYPE (TLS_LDM32, REL) > +RELOC_TYPE (TLS_LDO32, REL) > +RELOC_TYPE (TLS_DTPMOD32, EXEC|DYN) > +RELOC_TYPE (TLS_DTPOFF32, EXEC|DYN) > +RELOC_TYPE (TLS_TPOFF32, EXEC|DYN) The TLS variants aren't yet listed in the CPU ABI doc, but are in elf.h, so I assume they are OK. We can list the v1 variants also, their numbers don't overlap. Just checking it is done deliberately. If they can never occur in v2 ELF binaries I would leave them out. Cheers, Mark