summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2016-05-22 10:26:26 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2016-05-24 20:38:31 +0200
commitb1fb0d0bf5d09bf9dbdbc320814bd087d4d26460 (patch)
tree365626d43acf93b38f482ab6afcf708f4853eccc
parent6a8ccc95528f5e86a8770ed15ce89609b5b3dee9 (diff)
microblaze: fix ELF detection in ld.so
-rw-r--r--include/elf.h5
-rw-r--r--ldso/ldso/microblaze/dl-sysdep.h5
-rw-r--r--utils/ldd.c2
3 files changed, 5 insertions, 7 deletions
diff --git a/include/elf.h b/include/elf.h
index 5f47905f1..4a0280b80 100644
--- a/include/elf.h
+++ b/include/elf.h
@@ -362,11 +362,6 @@ typedef struct
/* V850 backend magic number. Written in the absense of an ABI. */
#define EM_CYGNUS_V850 0x9080
-/* Xilinx Microblaze (unofficial). Note that there is now an official microblaze
- * magic number, but all the toolchains currently in existence use the old number
- */
-#define EM_MICROBLAZE_OLD 0xbaab
-
/* Legal values for e_version (version). */
#define EV_NONE 0 /* Invalid ELF version */
diff --git a/ldso/ldso/microblaze/dl-sysdep.h b/ldso/ldso/microblaze/dl-sysdep.h
index 2b5521887..b293d27cc 100644
--- a/ldso/ldso/microblaze/dl-sysdep.h
+++ b/ldso/ldso/microblaze/dl-sysdep.h
@@ -30,11 +30,14 @@ do { \
/* Here we define the magic numbers that this dynamic loader should accept */
-#define MAGIC1 EM_MICROBLAZE_OLD
+#define MAGIC1 EM_MICROBLAZE
#undef MAGIC2
/* Used for error messages */
#define ELF_TARGET "microblaze"
+struct elf_resolve;
+unsigned long _dl_linux_resolver(struct elf_resolve * tpnt, int reloc_entry);
+
#define elf_machine_type_class(type) \
(((type) == R_MICROBLAZE_JUMP_SLOT) * ELF_RTYPE_CLASS_PLT \
| ((type) == R_MICROBLAZE_COPY) * ELF_RTYPE_CLASS_COPY)
diff --git a/utils/ldd.c b/utils/ldd.c
index 7fd4f7bb0..f6413c67c 100644
--- a/utils/ldd.c
+++ b/utils/ldd.c
@@ -107,7 +107,7 @@
#endif
#if defined(__microblaze__)
-#define MATCH_MACHINE(x) (x == EM_MICROBLAZE_OLD)
+#define MATCH_MACHINE(x) (x == EM_MICROBLAZE)
#define ELFCLASSM ELFCLASS32
#endif