summary refs log tree commit diff
path: root/elf
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2012-11-26 16:42:38 -0800
committerH.J. Lu <hjl.tools@gmail.com>2012-11-26 16:45:36 -0800
commitc515fb5148f1d81d5f7736825e14c7502c15432a (patch)
treebffe0f355bac8c00df91b12a1feddc768677bc5d /elf
parent4cf77aa9847aac13bf65c977396b6e8a66337238 (diff)
downloadglibc-c515fb5148f1d81d5f7736825e14c7502c15432a.tar.gz
glibc-c515fb5148f1d81d5f7736825e14c7502c15432a.tar.xz
glibc-c515fb5148f1d81d5f7736825e14c7502c15432a.zip
Cast to __intptr_t before casting pointer to int64
Diffstat (limited to 'elf')
-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 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)
 	  {