aboutsummaryrefslogtreecommitdiff
path: root/elf/dl-load.c
diff options
context:
space:
mode:
Diffstat (limited to 'elf/dl-load.c')
-rw-r--r--elf/dl-load.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/elf/dl-load.c b/elf/dl-load.c
index 0052bc2..0b896d9 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)) |