about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRoland McGrath <roland@hack.frob.com>2012-10-02 15:56:15 -0700
committerRoland McGrath <roland@hack.frob.com>2012-10-02 16:02:56 -0700
commit408223d403befad0ca6351863319608f2980efd7 (patch)
tree03e9ce4481c6cac20ee509f783cb56240eb4546a
parentfc997c6e55cc2636681db298eac4cb7c8568708f (diff)
downloadglibc-408223d403befad0ca6351863319608f2980efd7.tar.gz
glibc-408223d403befad0ca6351863319608f2980efd7.tar.xz
glibc-408223d403befad0ca6351863319608f2980efd7.zip
Use ElfW(Off) rather than off_t for offsets within ELF files.
-rw-r--r--ChangeLog5
-rw-r--r--elf/dl-load.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index c7f355bce2..77b6827227 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-10-02  Roland McGrath  <roland@hack.frob.com>
+
+	* elf/dl-load.c (_dl_map_object_from_fd: struct loadcmd):
+	Make 'mapoff' field ElfW(Off) rather than off_t.
+
 2012-10-02  Dmitry V. Levin  <ldv@altlinux.org>
 
 	* nscd/Makefile: Remove nscd-cflags and all its users.
diff --git a/elf/dl-load.c b/elf/dl-load.c
index 7bf0c12a7c..ea31417bda 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -1090,7 +1090,7 @@ _dl_map_object_from_fd (const char *name, int fd, struct filebuf *fbp,
     struct loadcmd
       {
 	ElfW(Addr) mapstart, mapend, dataend, allocend;
-	off_t mapoff;
+	ElfW(Off) mapoff;
 	int prot;
       } loadcmds[l->l_phnum], *c;
     size_t nloadcmds = 0;
@@ -1347,7 +1347,7 @@ cannot allocate TLS data structures for initial thread");
 	  l->l_text_end = l->l_addr + c->mapend;
 
 	if (l->l_phdr == 0
-	    && (ElfW(Off)) c->mapoff <= header->e_phoff
+	    && c->mapoff <= header->e_phoff
 	    && ((size_t) (c->mapend - c->mapstart + c->mapoff)
 		>= header->e_phoff + header->e_phnum * sizeof (ElfW(Phdr))))
 	  /* Found the program header in this segment.  */