This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: HUGEPAGE support in binutils/linux
- From: John Reiser <jreiser at bitwagon dot com>
- To: binutils at sourceware dot org
- Date: Tue, 20 Apr 2010 16:25:19 -0700
- Subject: Re: HUGEPAGE support in binutils/linux
- References: <678682.5192.qm@web51508.mail.re2.yahoo.com>
I want to load a program text with large pages (on intel nehalem), ...
If "load a program" means the system call execve(), then you must convince
the operating system kernel. Linux execve() does not support large pages.
Patching the kernel to provide such support probably takes a year or more.
If "load a program" means dlopen(), then you must convince rtld, which is
part of glibc. Current glibc provides no direct support for large pages.
Large page support is not part of any official Standard, so getting it
into glibc probably takes a many many years.
The soonest way to accomplish your goal is to use a "pre-loader"
such as used by the Wine project http://www.winehq.org .
The code in loader/preloader.c simulates a "user-mode execve()."
Wine uses its preloader to enforce preferred address ranges.
You can modify the preloader to prefer large pages instead.
Another user-mode execve() is http://BitWagon.com/rtldi/rtldi.html .
--