From b1fb0d0bf5d09bf9dbdbc320814bd087d4d26460 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sun, 22 May 2016 10:26:26 +0200 Subject: microblaze: fix ELF detection in ld.so --- include/elf.h | 5 ----- ldso/ldso/microblaze/dl-sysdep.h | 5 ++++- utils/ldd.c | 2 +- 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 -- cgit v1.2.3