summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/elf.h2
-rw-r--r--ldso/ldso/ldso.c3
2 files changed, 1 insertions, 4 deletions
diff --git a/include/elf.h b/include/elf.h
index 3e174bccf..0a58e0eec 100644
--- a/include/elf.h
+++ b/include/elf.h
@@ -124,8 +124,6 @@ typedef struct
# define ELFMAG_U32 ((uint32_t)(ELFMAG0 + 0x100 * (ELFMAG1 + (0x100 * (ELFMAG2 + 0x100 * ELFMAG3)))))
#elif __BYTE_ORDER == __BIG_ENDIAN
# define ELFMAG_U32 ((uint32_t)((((ELFMAG0 * 0x100) + ELFMAG1) * 0x100 + ELFMAG2) * 0x100 + ELFMAG3))
-#else
-# error Unknown host byte order!
#endif
#define EI_CLASS 4 /* File class byte index */
diff --git a/ldso/ldso/ldso.c b/ldso/ldso/ldso.c
index 4dcd99bfe..449328cac 100644
--- a/ldso/ldso/ldso.c
+++ b/ldso/ldso/ldso.c
@@ -434,8 +434,7 @@ void _dl_get_ready_to_run(struct elf_resolve *tpnt, DL_LOADADDR_TYPE load_addr,
_dl_loaded_modules->libtype = elf_executable;
_dl_loaded_modules->ppnt = (ElfW(Phdr) *) auxvt[AT_PHDR].a_un.a_val;
_dl_loaded_modules->n_phent = auxvt[AT_PHNUM].a_un.a_val;
- _dl_symbol_tables = rpnt = _dl_malloc(sizeof(struct dyn_elf));
- _dl_memset(rpnt, 0, sizeof(struct dyn_elf));
+ _dl_symbol_tables = rpnt = _dl_zalloc(sizeof(struct dyn_elf));
rpnt->dyn = _dl_loaded_modules;
app_tpnt->mapaddr = app_mapaddr;
app_tpnt->rtld_flags = unlazy | RTLD_GLOBAL;