diff options
Diffstat (limited to 'elf/dl-load.c')
-rw-r--r-- | elf/dl-load.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/elf/dl-load.c b/elf/dl-load.c index 0052bc22d4..0b896d9b47 100644 --- a/elf/dl-load.c +++ b/elf/dl-load.c @@ -1655,7 +1655,8 @@ open_verify (const char *name, struct filebuf *fbp, struct link_map *loader, EI_PAD), 0)) { /* Something is wrong. */ - if (*(Elf32_Word *) &ehdr->e_ident != + const Elf32_Word *magp = (const void *) ehdr->e_ident; + if (*magp != #if BYTE_ORDER == LITTLE_ENDIAN ((ELFMAG0 << (EI_MAG0 * 8)) | (ELFMAG1 << (EI_MAG1 * 8)) | |