public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [Linux-ia64] [patch] small but important change
@ 2002-04-29 21:40 David Mosberger
  0 siblings, 0 replies; only message in thread
From: David Mosberger @ 2002-04-29 21:40 UTC (permalink / raw)
  To: linux-ia64

Attached below is a one-liner that you may need to successfully build
glibc.  Without this change, you may see "make check" in the glibc
build fail with "out of memory" error messages.  The problem is due to
the fact that ld.so, when invoked directly, had only 16MB of virtual
memory available before bumping into the ld.so image.  Eventually,
this would cause brk() to fail.

The fix below is to increase ELF_ET_DYN_BASE to give up to 32GB of
virtual memory.  Of course, you can still come up with test cases
where there would be a conflict, but in practice, 32GB should carry us
for a long time (and the fundamental problem is inherent in the UNIX
process model).  An alternative would be to place a directly-invoked
loader in a different region, but I want to avoid that to minimize the
number of user regions that the kernel requires for proper operation.
Note that this issue comes up only when invoking relocatable ELF
binaries (such as ld.so).  With normal binaries, this issue won't
occur because the break value ends up in region 3.

NOTE TO DISTRIBUTORS: I'd like to encourage all distributions to
include this change in the kernel used for the next distro release.
It should be completely safe and avoids confusing errors during glibc
builds (there may be other cases where this pops up, though I'm not
aware of any).

	--david

--- include/asm-ia64/elf.h~	Mon Apr 22 19:54:07 2002
+++ include/asm-ia64/elf.h	Mon Apr 29 14:03:34 2002
@@ -39,7 +39,7 @@
  * the way of the program that it will "exec", and that there is
  * sufficient room for the brk.
  */
-#define ELF_ET_DYN_BASE		(TASK_UNMAPPED_BASE + 0x1000000)
+#define ELF_ET_DYN_BASE		(TASK_UNMAPPED_BASE + 0x800000000)
 
 
 /*


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-04-29 21:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-29 21:40 [Linux-ia64] [patch] small but important change David Mosberger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox