unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Mao Han <han_mao@c-sky.com>
To: libc-alpha@sourceware.org
Cc: Mao Han <han_mao@c-sky.com>
Subject: [PATCH 4/4] C-SKY: add elf header definition for elfutils
Date: Thu,  7 Mar 2019 09:34:06 +0800	[thread overview]
Message-ID: <fdbca3918525fafdf766372b5983b0bdd6339e03.1551922357.git.han_mao@c-sky.com> (raw)
In-Reply-To: <edbba2b7bdb7bb93dd1be5e068c6af81f845da8f.1551922357.git.han_mao@c-sky.com>
In-Reply-To: <edbba2b7bdb7bb93dd1be5e068c6af81f845da8f.1551922357.git.han_mao@c-sky.com>

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.  */
-- 
2.7.4


  parent reply	other threads:[~2019-03-07  1:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-07  1:34 [PATCH 1/4] C-SKY: fix sigcontext miss match Mao Han
2019-03-07  1:34 ` [PATCH 2/4] C-SKY: remove user_regs definition Mao Han
2019-03-07  1:34 ` [PATCH 3/4] C-SKY: mark lr as undefined to stop unwinding Mao Han
2019-03-07  1:34 ` Mao Han [this message]
2019-03-11  2:59 ` [COMMITTED][PATCH 1/4] C-SKY: fix sigcontext miss match Mao Han

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/libc/involved.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fdbca3918525fafdf766372b5983b0bdd6339e03.1551922357.git.han_mao@c-sky.com \
    --to=han_mao@c-sky.com \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).