From c515fb5148f1d81d5f7736825e14c7502c15432a Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Mon, 26 Nov 2012 16:42:38 -0800 Subject: Cast to __intptr_t before casting pointer to int64 --- elf/dl-load.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'elf') diff --git a/elf/dl-load.c b/elf/dl-load.c index a695556..70fe78f 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) { -- cgit v1.1