aboutsummaryrefslogtreecommitdiff
path: root/modutils/insmod.c
diff options
context:
space:
mode:
Diffstat (limited to 'modutils/insmod.c')
-rw-r--r--modutils/insmod.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/modutils/insmod.c b/modutils/insmod.c
index 26dd9783b..efa0499e4 100644
--- a/modutils/insmod.c
+++ b/modutils/insmod.c
@@ -516,12 +516,6 @@ int delete_module(const char *);
516#include <elf.h> 516#include <elf.h>
517#include <endian.h> 517#include <endian.h>
518 518
519#if BB_LITTLE_ENDIAN
520# define ELFDATAM ELFDATA2LSB
521#else
522# define ELFDATAM ELFDATA2MSB
523#endif
524
525#ifndef ElfW 519#ifndef ElfW
526# if ELFCLASSM == ELFCLASS32 520# if ELFCLASSM == ELFCLASS32
527# define ElfW(x) Elf32_ ## x 521# define ElfW(x) Elf32_ ## x
@@ -3331,7 +3325,8 @@ static struct obj_file *obj_load(FILE * fp, int loadprogbits)
3331 return NULL; 3325 return NULL;
3332 } 3326 }
3333 if (f->header.e_ident[EI_CLASS] != ELFCLASSM 3327 if (f->header.e_ident[EI_CLASS] != ELFCLASSM
3334 || f->header.e_ident[EI_DATA] != ELFDATAM 3328 || f->header.e_ident[EI_DATA] != (BB_BIG_ENDIAN
3329 ? ELFDATA2MSB : ELFDATA2LSB)
3335 || f->header.e_ident[EI_VERSION] != EV_CURRENT 3330 || f->header.e_ident[EI_VERSION] != EV_CURRENT
3336 || !MATCH_MACHINE(f->header.e_machine)) { 3331 || !MATCH_MACHINE(f->header.e_machine)) {
3337 bb_error_msg("ELF file not for this architecture"); 3332 bb_error_msg("ELF file not for this architecture");