Date: Fri, 05 Feb 1999 09:48:45 -0800 (PST) From: John Polstra <jdp@polstra.com> To: alpha@FreeBSD.ORG Subject: Could somebody please test this patch? Message-ID: <XFMail.990205094845.jdp@polstra.com>
index | next in thread | raw e-mail
[-- Attachment #1 --]
Could somebody with an Alpha close at hand do me a big favor and test
the attached patch? It moves the load address of the dynamic linker
from the bogus fixed address "2L*MAXDSIZ" to whereever a userland
mmap(0, ...) call would have put it. It should have no noticeable
affect on your system, except maybe if you look at "/proc/<pid>/map".
The patch solves a problem for large-memory i386 configurations.
I'd like to commit it ASAP, but it would be nice to confirm first
that I didn't break Alphas.
Thanks in advance,
John
---
John Polstra jdp@polstra.com
John D. Polstra & Co., Inc. Seattle, Washington USA
"Nobody ever went broke underestimating the taste of the American public."
-- H. L. Mencken
[-- Attachment #2 --]
Index: imgact_elf.c
===================================================================
RCS file: /home/ncvs/src/sys/kern/imgact_elf.c,v
retrieving revision 1.48
diff -u -r1.48 imgact_elf.c
--- imgact_elf.c 1999/02/04 12:42:31 1.48
+++ imgact_elf.c 1999/02/05 05:49:40
@@ -511,7 +511,15 @@
vmspace->vm_dsize = data_size >> PAGE_SHIFT;
vmspace->vm_daddr = (caddr_t)(uintptr_t)data_addr;
- addr = 2L*MAXDSIZ; /* May depend on OS type XXX */
+#ifdef ELF_RTLD_ADDR
+ addr = ELF_RTLD_ADDR;
+#else
+ /*
+ * Load the dynamic linker where mmap(0, ...) would put it.
+ * See mmap() in "vm/vm_mmap.c".
+ */
+ addr = round_page((vm_offset_t)vmspace->vm_daddr + MAXDSIZ);
+#endif
imgp->entry_addr = entry;
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.990205094845.jdp>
