summaryrefslogtreecommitdiff
path: root/libc/elf/dl-load.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/elf/dl-load.c')
-rw-r--r--libc/elf/dl-load.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libc/elf/dl-load.c b/libc/elf/dl-load.c
index c66e68d8e..0fe664145 100644
--- a/libc/elf/dl-load.c
+++ b/libc/elf/dl-load.c
@@ -1351,7 +1351,8 @@ cannot allocate TLS data structures for initial thread");
&& ((size_t) (c->mapend - c->mapstart + c->mapoff)
>= header->e_phoff + header->e_phnum * sizeof (ElfW(Phdr))))
/* Found the program header in this segment. */
- l->l_phdr = (void *) (c->mapstart + header->e_phoff - c->mapoff);
+ l->l_phdr = (void *) (uintptr_t) (c->mapstart + header->e_phoff
+ - c->mapoff);
if (c->allocend > c->dataend)
{