From patchwork Thu Mar 7 01:34:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?5q+b5pmX?= X-Patchwork-Id: 1052615 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-100459-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=c-sky.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="hS/uabrx"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44FDCy5Sjxz9s4Y for ; Thu, 7 Mar 2019 12:52:46 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; q=dns; s=default; b=fiXEriNY S3y7SyFw1PNv6pbyMox2SHVbwu51SzELl1KluPDnpa0YHMeMfU72o+xn1dJgdQqm XmC5NyuFrXUj09r/iI3cP+cE2zSNCVQovNKZmaY05N5py71iq1IZX1qpUt0d8gHp FbjYRhYwtITH0E0PGfUkIDsOT8iA3I1RigA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; s=default; bh=DMKsa/QI0UHCQt wExMqg4szDxtU=; b=hS/uabrxZe61ZGl82otMzkKWwE+TALLXI+MaxmyMw1w3Jc rrXDYPDgcuMkONxkldx2RPAQOo1AEB3UjGuCRwaiSLBqC2ObVPe5Ywq/5PSf7I96 SGcFrrsdk2bOxW5mv+uSBl9V/CTq8AoDzARRqYVTd8HjegmFXoFuJju58D8zY= Received: (qmail 74537 invoked by alias); 7 Mar 2019 01:52:40 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 74448 invoked by uid 89); 7 Mar 2019 01:52:39 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, FSL_HELO_NON_FQDN_1, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3 autolearn=ham version=3.3.1 spammy=H*r:Unknown, ia64, relate X-HELO: vmh-VirtualBox From: Mao Han To: libc-alpha@sourceware.org Cc: Mao Han Subject: [PATCH 4/4] C-SKY: add elf header definition for elfutils Date: Thu, 7 Mar 2019 09:34:06 +0800 Message-Id: In-Reply-To: References: In-Reply-To: References: This patch adds some defines relate to machine flag and section information, which is used by elfutils elflint check. A C-SKY typo is also fixed with this patch. * elf/elf.h (EF_CSKY_ABIMASK, EF_CSKY_OTHER, EF_CSKY_PROCESSOR) (EF_CSKY_ABIV1, EF_CSKY_ABIV2, SHT_CSKY_ATTRIBUTES): New defines. --- elf/elf.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/elf/elf.h b/elf/elf.h index 47a514a..01648bd 100644 --- a/elf/elf.h +++ b/elf/elf.h @@ -360,7 +360,7 @@ typedef struct #define EM_RISCV 243 /* RISC-V */ #define EM_BPF 247 /* Linux BPF -- in-kernel virtual machine */ -#define EM_CSKY 252 /* C_SKY */ +#define EM_CSKY 252 /* C-SKY */ #define EM_NUM 253 @@ -3022,7 +3022,7 @@ enum /* Keep this the last entry. */ #define R_ARM_NUM 256 -/* csky */ +/* C-SKY */ #define R_CKCORE_NONE 0 /* no reloc */ #define R_CKCORE_ADDR32 1 /* direct 32 bit (S + A) */ #define R_CKCORE_PCRELIMM8BY4 2 /* disp ((S + A - P) >> 2) & 0xff */ @@ -3086,6 +3086,17 @@ enum #define R_CKCORE_TLS_DTPOFF32 57 #define R_CKCORE_TLS_TPOFF32 58 +/* C-SKY elf header definition. */ +#define EF_CSKY_ABIMASK 0XF0000000 +#define EF_CSKY_OTHER 0X0FFF0000 +#define EF_CSKY_PROCESSOR 0X0000FFFF + +#define EF_CSKY_ABIV1 0X10000000 +#define EF_CSKY_ABIV2 0X20000000 + +/* C-SKY attributes section. */ +#define SHT_CSKY_ATTRIBUTES (SHT_LOPROC + 1) + /* IA-64 specific declarations. */ /* Processor specific flags for the Ehdr e_flags field. */