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 a6955561f3..70fe78f3e7 100644 --- a/elf/dl-load.c +++ b/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) { |