Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/libexec/ld.elf_so Use _rtld_pagesz instead of PAGESIZE.
details: https://anonhg.NetBSD.org/src/rev/8600a5b5a4d2
branches: trunk
changeset: 536919:8600a5b5a4d2
user: junyoung <junyoung%NetBSD.org@localhost>
date: Tue Sep 24 09:35:13 2002 +0000
description:
Use _rtld_pagesz instead of PAGESIZE.
diffstat:
libexec/ld.elf_so/map_object.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (37 lines):
diff -r e303d6f8aa09 -r 8600a5b5a4d2 libexec/ld.elf_so/map_object.c
--- a/libexec/ld.elf_so/map_object.c Tue Sep 24 09:34:39 2002 +0000
+++ b/libexec/ld.elf_so/map_object.c Tue Sep 24 09:35:13 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: map_object.c,v 1.18 2002/09/24 09:26:43 junyoung Exp $ */
+/* $NetBSD: map_object.c,v 1.19 2002/09/24 09:35:13 junyoung Exp $ */
/*
* Copyright 1996 John D. Polstra.
@@ -86,7 +86,7 @@
size_t nclear;
#endif
- u = mmap(NULL, PAGESIZE, PROT_READ, MAP_FILE | MAP_SHARED, fd,
+ u = mmap(NULL, _rtld_pagesz, PROT_READ, MAP_FILE | MAP_SHARED, fd,
(off_t)0);
if (u == MAP_FAILED) {
_rtld_error("%s: read error: %s", path, xstrerror(errno));
@@ -123,7 +123,8 @@
* always true in practice. And, it simplifies things considerably.
*/
assert(ehdr->e_phentsize == sizeof(Elf_Phdr));
- assert(ehdr->e_phoff + ehdr->e_phnum * sizeof(Elf_Phdr) <= PAGESIZE);
+ assert(ehdr->e_phoff + ehdr->e_phnum * sizeof(Elf_Phdr) <=
+ _rtld_pagesz);
/*
* Scan the program header entries, and save key information.
@@ -273,7 +274,7 @@
return obj;
bad:
- munmap(u, PAGESIZE);
+ munmap(u, _rtld_pagesz);
return NULL;
}
Home |
Main Index |
Thread Index |
Old Index