From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Sun, 17 Feb 2008 13:30:03 +0000 To: "Fans of the OS Plan 9 from Bell Labs" <9fans@cse.psu.edu> Subject: Re: [9fans] Non-stack-based calling conventions From: "Eris Discordia" Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-15 MIME-Version: 1.0 References: <86639420482c8f4a36c4ce9a8822c9e0@coraid.com> Content-Transfer-Encoding: 7bit Message-ID: In-Reply-To: <86639420482c8f4a36c4ce9a8822c9e0@coraid.com> User-Agent: Opera Mail/9.23 (Win32) Topicbox-Message-UUID: 57d4c5dc-ead3-11e9-9d60-3106f5b1d025 On Sun, 17 Feb 2008 00:04:31 -0000, Brantley Coile wrote: > The relocation formats for the 6600 assembler wasn't that complicated, > much less than coff. For the Cyber 17/18 the instructions could > be pc relative and didn't have to be relocated when linked together, > at least not for the call/return scenario. I remember the necessity of relocation was not limited to where you had to link binaries. On the 80286 + MS-DOS combination, lack of virtual memory hardware (the "real" mode) made relocation inevitable as processes were not isolated and memory was not multiplexed by the hardware and/or OS. Without a flat and isolated address space for each process, every executable had to adjust to where it was being loaded. Hence, the EXE header and relocation table. COFF has had to cope with a certain monster dubbed portability; to adapt to the peculiarities of the many flavors of UNIX (and at least one Microsoft OS, with MS-COFF). So good it has been practically put out of business by ELF or... do Plan 9 compilers output COFF object files? > The 6600 had a field address that was added to the program counter > to relocate the program. It also had a field length register to > make sure you didn't spill off the end. No far jumps/calls? Was the memory model not segmented? > All was much simpler than today. I am actually very grateful for having a flat 32/64 bit address space all to myself. Even though the curse of managing virtual memory and driving the associated hardware has been placed on every OS developer, occasional programmers like me really enjoy the outcome. -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/