From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 31959 invoked from network); 25 Feb 2023 20:15:41 -0000 Received: from minnie.tuhs.org (50.116.15.146) by inbox.vuxu.org with ESMTPUTF8; 25 Feb 2023 20:15:41 -0000 Received: from minnie.tuhs.org (localhost [IPv6:::1]) by minnie.tuhs.org (Postfix) with ESMTP id B863843266; Sun, 26 Feb 2023 06:15:36 +1000 (AEST) Received: from cuzuco.com (v.cuzuco.com [166.84.7.17]) by minnie.tuhs.org (Postfix) with ESMTP id 2F8AE43265 for ; Sun, 26 Feb 2023 06:15:31 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by cuzuco.com (8.14.9/8.13.3) with SMTP id 31PKEpDi026986 for ; Sat, 25 Feb 2023 15:15:06 -0500 (EST) Date: Sat, 25 Feb 2023 15:14:51 -0500 (EST) Message-Id: <202302252015.31PKEpDi026986@cuzuco.com> From: Brian Walden To: Message-ID-Hash: HS632BBJS36WZUGXF7T6AOHI6MBUKCN6 X-Message-ID-Hash: HS632BBJS36WZUGXF7T6AOHI6MBUKCN6 X-MailFrom: tuhs@cuzuco.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [TUHS] Re: Origins of the SGS (System Generation Software) and COFF (Common Object File Format) List-Id: The Unix Heritage Society mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: It was originaly 205. See A.OUT(V) (the first page) at https://www.bell-labs.com/usr/dmr/www/man51.pdf it was documented as to why. The header always contains 6 words: 1 "br .+14" instruction (205(8)) 2 The size of the program text 3 The size of the symbol table 4 The size of the relocation bits area 5 The size of a data area 6 A zero word (unused at present) I always found this so elegant in it's simplicity. Just load and start execution at the start (simplifies exec(2) in the kernel) I always wondered if this has done anywhere else before, or invenetd first in unix. Theres was also a recent discussion of ar(1). That pdf also explains its magic number a few pages later. It was simply choosen because it seemed unique. A file produced by ar has a "magic number" at the start, followed by the constituent files, each preceded by a file header. The magic number is -147(10), or 177555(8) (it was chosen to be unlikely to occur anywhere else). -Brian On Sat, 25 Feb 2023, Dave Horsfall wrote: > On Thu, 23 Feb 2023, Paul Winalski wrote: > > > a.out was, as object file formats go, a throwback to the stone age from > > the get-go. Even the most primitive of IBM's link editors for > > System/360 supported arbitrary naming of object file sections and the > > ability for the programmer to arrange them in whatever order they > > wished. a.out's restriction to three sections (.text, .data, .bss) did > > manage to get the job done, and even (with ZMAGIC) could support > > demand-paged virtual memory, but only just. > > That may be so, but those guys didn't exactly have the resources of > IBM behind them... > > And I wonder how many people here know the significance of the "407" magic > number? > > -- Dave