diff mbox series

[uclibc-ng-devel,V2,1/1] csky: Add EM_CSKY for ldso

Message ID ac7559e31e4a7eb6cfc536f555b79bc023b335ec.1545816548.git.ren_guo@c-sky.com
State Superseded
Headers show
Series [uclibc-ng-devel,V2,1/1] csky: Add EM_CSKY for ldso | expand

Commit Message

Guo Ren Dec. 26, 2018, 9:29 a.m. UTC
From: Guo Ren <ren_guo@c-sky.com>

Support EM_CSKY 252 elf format.

Changelog:
Increase EM_NUM to 253

Signed-off-by: Guo Ren <ren_guo@c-sky.com>
---
 include/elf.h              | 3 ++-
 ldso/ldso/csky/dl-sysdep.h | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/include/elf.h b/include/elf.h
index a9957fc..9aae04c 100644
--- a/include/elf.h
+++ b/include/elf.h
@@ -271,9 +271,10 @@  typedef struct
 #define EM_AARCH64	183		/* ARM AARCH64 */
 #define EM_MICROBLAZE	189		/* Xilinx Microblaze */
 #define EM_ARCV2	195		/* ARCv2 Cores */
+#define EM_CSKY		252		/* C-SKY Cores */
 
 /* NEXT FREE NUMBER: Increment this after adding your official arch number */
-#define EM_NUM		196
+#define EM_NUM		253
 
 /* If it is necessary to assign new unofficial EM_* values, please pick large
    random numbers (0x8523, 0xa7f2, etc.) to minimize the chances of collision
diff --git a/ldso/ldso/csky/dl-sysdep.h b/ldso/ldso/csky/dl-sysdep.h
index 04aae68..2230450 100644
--- a/ldso/ldso/csky/dl-sysdep.h
+++ b/ldso/ldso/csky/dl-sysdep.h
@@ -18,7 +18,7 @@  do {                                                        \
 
 /* Here we define the magic numbers that this dynamic loader should accept */
 #define MAGIC1 EM_MCORE
-#undef  MAGIC2
+#define MAGIC2 EM_CSKY
 
 /* Used for error messages */
 #define ELF_TARGET "csky"