]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
C-SKY: add elf header definition for elfutils
authorMao Han <han_mao@c-sky.com>
Mon, 11 Mar 2019 01:54:34 +0000 (09:54 +0800)
committerMao Han <han_mao@c-sky.com>
Mon, 11 Mar 2019 01:54:34 +0000 (09:54 +0800)
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.

ChangeLog
elf/elf.h

index 2f47cb8997cba048e2d6124692f87033eab916f9..9bf1e4e3c8bd774739b344a76a494b3f143c6df7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2019-03-11  Mao Han  <han_mao@c-sky.com>
+
+       * elf/elf.h (EF_CSKY_ABIMASK, EF_CSKY_OTHER, EF_CSKY_PROCESSOR)
+       (EF_CSKY_ABIV1, EF_CSKY_ABIV2, SHT_CSKY_ATTRIBUTES): New defines.
+
 2019-03-11  Mao Han  <han_mao@c-sky.com>
 
        * sysdeps/csky/abiv2/start.S: Mark lr as undefined.
index 47a514a389f0cdabc1c9e1b7d6817db7fd718727..01648bdb4c1da730361c0f89cfaee3e0c0de927c 100644 (file)
--- 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.  */