Re: [Tack-devel] ACK compiles on NetBSD-macppc, sort of...
Moved to https://github.com/davidgiven/ack
Brought to you by:
dtrg
From: Gregory T. (t. K. <gt...@di...> - 2006-07-21 21:26:33
|
At 4:13 PM -0400 7/21/06, Perry E. Metzger wrote: >>>Well, this is an assembler issue, right? It should be straightforward >>>to generate ELF instead of other formats. You pretty much *need* ELF >>>on all modern platforms -- Linux and all the rest use ELF too. You >>>probably also need to be able to properly embed debugging symbols... >> >> I can't answer that at this time. > >What is there to answer? :) Whether or not it is better to break the structure and generate ELF= natively, or keep the ACK structure and convert ack.out to ELF. >> It is probably important to consider that Tanenbaum's group went >> with multiple address space segmentation for a virtual memory model, >> while the rest of the world went with singe address space paging. > >Er, huh???? It would seem to me that the virtual memory model used by an operating= system would have some impact on choices of file formats. Beyond what is= needed to get ACK running on NetBSD, I am not particularly concerned with= ensuring ELF is the native file format. >> Rather than having to go through some of the very twisted hoops (and >> at least on PPC 32-bit ELF, broken hoops) to achieve various memory >> protections for each section, Minix just puts each section in its >> own address space (segment).=20 > >Er, the original Minix didn't have a choice, and modern Minix is >demand paged, not segment swapped.=20 That statement would be in direct contradiction to "Operating Systems:= Design and Implementation" (Tanenbaum, Woodhull) page 420: "Memory management in Minix 3 is simple: paging is not used at all. Minx 3= memory management as we will discuss it here does not include swapping eith= er." Additionally, on page 422: "In Minix 3, however, the default is to compile programs to use separate I= and D space." >All modern operating systems are >demand paged. There isn't even support for segmentation on PPC -- the >x86 alone of modern processors still sort of has it but it is a rather >lame holdover in the architecture. There's a difference between operating systems lacking support for PowerPC's= segmentation model and PowerPC lacking support for segmentation. While= almost all operating systems lack support for PPC's segmentation model, PPC= paged segmentation itself is quite robust (see Section 7.5 of the= Programming Environment Manual, in particular the discussion on virtual= segment IDs). While I don't have any direct experience confirming this,= there are plenty of discussions on the web indicating that 32-bit PowerPC= ELF breaks a lot of PPC's possibilities. There is a reason why almost all= PPC vendors use file formats other than ELF (PEF, IBM's modified xcoff,= Mach-O for all its warts), and there are reasons I am reluctant to spend= any time more than absolutely necessary making ACK work with ELF. In NetBSD/macppc the default is just to map the segment registers in 256M= increments for the full 4G/32 bit address space. That is only one possible= use of the segment registers, but expected in a single address space paged= operating system. There are 16 segment registers, each capable of= containing a 24 bit segment id and protection state for that 256M space. = That's a lot of support for segmentation. Or at least, that's my= understanding of the paged segmentation mode and that it is widely underuti= lized. tim Gregory T. (tim) Kelly Owner Dialectronics.com P.O. Box 606 Newberry, SC 29108 "Anything war can do, peace can do better." -- Bishop Desmond Tutu |