Browse Source

microblaze: fix ELF detection in ld.so

Waldemar Brodkorb 8 years ago
parent
commit
b1fb0d0bf5
3 changed files with 5 additions and 7 deletions
  1. 0 5
      include/elf.h
  2. 4 1
      ldso/ldso/microblaze/dl-sysdep.h
  3. 1 1
      utils/ldd.c

+ 0 - 5
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 */

+ 4 - 1
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)

+ 1 - 1
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