This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: mapping shared libraries at fixed address...


Faré <fahree@gmail.com> writes:

> So as to be able to mmap BIG data files on i386, I would like to get
> the shared libraries out of the way. With no userspace specification,
> ld.so and libc.so are mmap()ed by the kernel at one third of the
> address space (starting at 0x55555000), which means that I can't mmap
> contiguously a file larger than 1.6GB approximately (less than I
> need), at opposed to a maximum of 2.9GB or so if I could get the
> libraries loaded near the bottom of the memory.

We had a similar problem in Wine, since we need to load Windows
binaries at fixed addresses. What we ended up doing is a preloader
that allows you to reserve a range of addresses before ld.so and libc
are mapped. You can find the code here:

  http://source.winehq.org/git/?p=wine.git;a=blob;hb=HEAD;f=loader/preloader.c

-- 
Alexandre Julliard
julliard@winehq.org


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