On Thu May 15 15:19:39 EDT 2014, cinap_len...@felloff.net wrote:
> that wont work for a.out userspace binary. the kernel loads
> the text segment on fixed base address UTZERO. in the a.out
> header are just longs with the sizes of the segments. theres
> an entry field but it doesnt change where the kernel puts the
> text segment.
> 
> but you probably do not try to produce an a.out?

there is a provision for a 64-bit address in the extended a.out header.  

the problem is the amd64 architecture.  ron actually pointed this out to me
way back, when i thought it would be neater to load the kernel lower
than 0xfffffffff0110000 to allow the kernel to map more than 256mb
of memory, but that's not possible.  if using absolute addressing, the kernel
needs to load at a sign extended virtual address, or below 4g.  if the kernel
were rip-relative, i beleve it could be just about anywhere in the virtual
address space, but i haven't tried this and i may have missed a wherefore
in the intel manual.

it turns out that it's just as easy to load the data at KSEG2, so that's what
is done.  in fact, perhaps KZERO should be moved up to 2⁶⁴-64MB.  then
all the data could be in KSEG2.  clean, if a little unconventional.

- erik

Reply via email to