Re: how to unmap first 64k for a.out ?

Richard Henderson (richard@atheist.tamu.edu)
Thu, 26 Sep 1996 09:32:43 -0500 (CDT)


> >is there a way to build an a.out binary which has all the first 64k
> >unmapped and not only the first page (4k) ?
>
> Not with a.out. There isn't sufficient information in the a.out
> header to specify a different load address (from linux/a.out.h):

However, you could add an object file first on the link line with

.text
__fake_start:
.skip 64*1024

and then do

munmap(0, 64*1024);

at the beginning of main.

r~