From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from minnie.tuhs.org (minnie.tuhs.org [45.79.103.53]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 7a525ae7 for ; Sat, 29 Dec 2018 01:27:01 +0000 (UTC) Received: by minnie.tuhs.org (Postfix, from userid 112) id 5C53FAACEB; Sat, 29 Dec 2018 11:27:00 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id B2CEDAACE8; Sat, 29 Dec 2018 11:26:32 +1000 (AEST) Authentication-Results: minnie.tuhs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="pWZrg/iz"; dkim-atps=neutral Received: by minnie.tuhs.org (Postfix, from userid 112) id A1429950AB; Sat, 29 Dec 2018 11:26:30 +1000 (AEST) Received: from mail-oi1-f171.google.com (mail-oi1-f171.google.com [209.85.167.171]) by minnie.tuhs.org (Postfix) with ESMTPS id 0DD6494EB2 for ; Sat, 29 Dec 2018 11:26:30 +1000 (AEST) Received: by mail-oi1-f171.google.com with SMTP id a77so18527328oii.5 for ; Fri, 28 Dec 2018 17:26:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=PkRYfA23ORcdIDOr1bt1nn8g39x9Alxe+0OKhCEhe58=; b=pWZrg/izBWac1GbN7f8AH4a8BWFD0LHLsbQ5q1nJYoppMQewNCHiko28uE+gOK0/rk Nr3OaB/3ct7TMF0cX78G/7Ju/fq3wGzDZ/X/5vY7k+6cC+LEsZloHee//uVBsMuVY4NM gg4FYPuUXuzhDOQfbzRQ8bZZt5hR+xD4cZLjQxheeYNXrSmeYPK4lIphT5wa7AnTbVZ2 TaO6q7ocjMoQOxaWEeB/lXO6S0gMp49f4empopH96RSXR6kLYnEeFEeecIanicwwuSvS QkujA9ntvrdVmi8AOhLglFsEzHmrXe4b16O6ktE7A8WOEZaACorszIPvzp7THOhXSU7R qYWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=PkRYfA23ORcdIDOr1bt1nn8g39x9Alxe+0OKhCEhe58=; b=VEC9OwmI2alfhbLBUvZdulgREo8nwujQJP/vP6ScBe3io5W4N9nkvUm7eYdI4daabB zA/LlqbAiN536QSqX8OmaxqdoTBYwHfz/96Pk5XveadN3EPnqxuLgBnGMNZAj8MKJ0pF OZGxCnyXRfhn7FUltvtixKvNImyq5hGuhyHFRlr2IAi7jb0lttxtlC+40pSXH56gOvFu ctA/+CHX897ZjjVxcK0pol2oMQZRGb9FBv85v86LIwr3nk5GkEcVvQ51woz1h1Afo3Bh Vq38WZNaZoLY6IT8rWqheR3CKKMgrpgWBuetuPVUKW1Yt7ZFP99wZMZKPJwbpb7Luxd6 ruSw== X-Gm-Message-State: AA+aEWYFDkSBQqEdjYzVoT7ZyV+ch8bE1SAwjeSoiDcVJZ3AGIMaS8OX jQFhiS81XuAVLI8MExpSFbKxd9DD X-Google-Smtp-Source: ALg8bN4xRf082Tl6F+JawM/o6VGPugF56dVP3TXhphnuSw375HZzmFGSfvDfiTqnbDQu2snqIPou4A== X-Received: by 2002:a54:4d01:: with SMTP id v1mr18161474oix.246.1546046787469; Fri, 28 Dec 2018 17:26:27 -0800 (PST) Received: from [10.3.143.200] ([107.242.112.41]) by smtp.gmail.com with ESMTPSA id t8sm20934074otp.69.2018.12.28.17.26.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Dec 2018 17:26:26 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (1.0) From: Will Senn X-Mailer: iPhone Mail (16B92) In-Reply-To: <20181229010900.19F6218C074@mercury.lcs.mit.edu> Date: Fri, 28 Dec 2018 19:26:23 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: References: <20181229010900.19F6218C074@mercury.lcs.mit.edu> To: Noel Chiappa Subject: Re: [TUHS] Deleted lib1 and lib2 in v6, recoverable? X-BeenThere: tuhs@minnie.tuhs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: The Unix Heritage Society mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: tuhs@minnie.tuhs.org Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" Ah! Thanks Noel. Yes, the two files are created and then a slew of linker er= rors. What you say makes sense. I can just compare with another v6 instance= that I have that is similar to replicate the delivered order. Now I=E2=80=99= m off to trying it out. Will Sent from my iPhone On Dec 28, 2018, at 7:09 PM, Noel Chiappa wrote: >> From: Will Senn >=20 >> I whacked /usr/sys/lib1 and lib2 'accidentally' meaning I logged in as >> bin changed to /usr/sys and typed rm lib1 and rm lib2 :). >=20 > Doesn't sound very accidental... :-) >=20 >> sh run as bin doesn't do it. >=20 > Odd. 'run' in /usr/sys on my V6 machine (not that I use that, mind) says: >=20 > chdir ken > cc -c -O *.c > ar r ../lib1 > rm *.o > chdir ../dmr > cc -c -O *.c > ar r ../lib2 > rm *.o =20 >=20 > which should regenerate them - sort of. I suspect you really meant 'doing s= h > run creates a lib1 and lib2, but then I get errors from the ld phase with > missing symbols'. Yes? >=20 > If so, the thing is that the V6 linker won't pull in an object module from= a > library unless a global in it satisfies an already existing (i.e. in the > linking process) undefined global. (I don't know if this is true of later > linkers; never used 'em.) In other words, when loading a multi-module syst= em, > the module with 'main' has to be first, and then the rest in an order such= > that each one holds a previously-undefined symbol. >=20 > So the order of the object modules you'll get in lib? from the above, if y= ou > precede them with 'rm lib?', is probably not the right order. (The above s= hell > script assumes they already exist, with the modules in the right order, so= the > above just replaces them with the newly compiled versions...) >=20 >> So, what magic incantation is required to rebuild them. >=20 > Here's the ordering in lib1: >=20 > main.o > alloc.o > iget.o > prf.o > rdwri.o > slp.o > subr.o > text.o > trap.o > sig.o > sysent.o > clock.o > fio.o > malloc.o > nami.o > pipe.o > sys1.o > sys2.o > sys3.o > sys4.o =20 >=20 > Other orders would work too (e.g. you could move sys?.o up just after syse= nt.o > and it should work). >=20 > My lib2 is somewhat odd, so I hesitate to list it, but since most modules i= n > dmr are pulled in from entries in c.c, almost any order will work, I think= . >=20 > Noel