This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: HUGEPAGE support in binutils/linux


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 .

--


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]