The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Will Senn <will.senn@gmail.com>
To: Noel Chiappa <jnc@mercury.lcs.mit.edu>
Cc: tuhs@minnie.tuhs.org
Subject: Re: [TUHS] Deleted lib1 and lib2 in v6, recoverable?
Date: Fri, 28 Dec 2018 19:26:23 -0600	[thread overview]
Message-ID: <AE79DCE9-DE5F-4B97-8807-3CC668C9C3C5@gmail.com> (raw)
In-Reply-To: <20181229010900.19F6218C074@mercury.lcs.mit.edu>

Ah! Thanks Noel. Yes, the two files are created and then a slew of linker errors.  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’m off to trying it out.


Will


Sent from my iPhone

On Dec 28, 2018, at 7:09 PM, Noel Chiappa <jnc@mercury.lcs.mit.edu> wrote:

>> From: Will Senn
> 
>> 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 :).
> 
> Doesn't sound very accidental... :-)
> 
>> sh run as bin doesn't do it.
> 
> Odd. 'run' in /usr/sys on my V6 machine (not that I use that, mind) says:
> 
>  chdir ken
>  cc -c -O *.c
>  ar r ../lib1
>  rm *.o
>  chdir ../dmr
>  cc -c -O *.c
>  ar r ../lib2
>  rm *.o        
> 
> which should regenerate them - sort of. I suspect you really meant 'doing sh
> run creates a lib1 and lib2, but then I get errors from the ld phase with
> missing symbols'. Yes?
> 
> 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 system,
> the module with 'main' has to be first, and then the rest in an order such
> that each one holds a previously-undefined symbol.
> 
> So the order of the object modules you'll get in lib? from the above, if you
> precede them with 'rm lib?', is probably not the right order. (The above shell
> script assumes they already exist, with the modules in the right order, so the
> above just replaces them with the newly compiled versions...)
> 
>> So, what magic incantation is required to rebuild them.
> 
> Here's the ordering in lib1:
> 
>  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   
> 
> Other orders would work too (e.g. you could move sys?.o up just after sysent.o
> and it should work).
> 
> My lib2 is somewhat odd, so I hesitate to list it, but since most modules in
> dmr are pulled in from entries in c.c, almost any order will work, I think.
> 
>    Noel

  reply	other threads:[~2018-12-29  1:27 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-29  1:09 Noel Chiappa
2018-12-29  1:26 ` Will Senn [this message]
2018-12-29  1:35 ` Warren Toomey
     [not found]   ` <82e23dba-38a4-3ee4-e35a-6293b8eef749@gmail.com>
2018-12-29  4:59     ` Warren Toomey
2018-12-29 16:26       ` Clem Cole
2018-12-29 16:49         ` Warner Losh
2018-12-29 17:48           ` Clem cole
2018-12-30 18:34 ` Paul Winalski
2018-12-30 18:48   ` ron
2018-12-30 18:56     ` Warner Losh
2018-12-30 19:02     ` Paul Winalski
2018-12-31  0:00   ` Donald ODona
2018-12-31 17:51     ` Paul Winalski
  -- strict thread matches above, loose matches on Subject: below --
2018-12-31  3:22 Rudi Blom
2018-12-31  2:28 Doug McIlroy
2018-12-31  3:34 ` Will Senn
2018-12-31  6:52   ` ron
2018-12-30 19:07 Norman Wilson
2018-12-30 19:24 ` Paul Winalski
2018-12-31  6:57 ` arnold
2019-01-02 13:54   ` Tony Finch
2018-12-29 14:13 Noel Chiappa
2018-12-29  0:25 Will Senn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AE79DCE9-DE5F-4B97-8807-3CC668C9C3C5@gmail.com \
    --to=will.senn@gmail.com \
    --cc=jnc@mercury.lcs.mit.edu \
    --cc=tuhs@minnie.tuhs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).