[comp.os.minix] ordering of /usr/lib/libc.a

hall@cod.NOSC.MIL (Robert R. Hall) (03/15/89)

I put my /usr/lib/libc.a in ordered by doing:

    lorder /usr/lib/libc.a > tmp
    sort tmp > elt

I tried this using one statment in a pipe command but
got a error message implying that there were too many
commands to fit into memory all at the same time.
The file elt is a sorted two column list giving
module elements and who they call.  The primatives
calls no one and only occures in the list once and were
extracted using:

    sed -e 's/ .*//' elt | uniq -u > prims

I then used stevie(vi) to delete all line in the file elt
which reference module in the prims list and then extracted
the next level of unique names.  The following list
gives the order thus obtained.  I then used:

   ar -ma <predecessor.file> libc.a <current.file>

to put the archive file into this order.  This put
the primatives last and is the reverse from the order
obtained using tsort which put the primitives first.
Since I have done this I have not gotten any undefined
reference to file in the archive.

lock.s        
popen.s       
sleep.s       
signal.s      
catchsig.s    
curses.s      
getopt.s      
ctime.s       
fprintf.s     
freopen.s     
getpass.s     
gtty.s        
puts.s        
sprintf.s     
stty.s        
termcap.s     
doprintf.s    
fdopen.s      
fopen.s       
fputs.s       
fwrite.s      
iaar.s        
ilar.s        
ioctl.s       
isar.s        
printk.s      
prints.s      
regexp.s      
scanf.s       
cii.s         
csa2.s        
csb2.s        
cuu.s         
fakfp.s       
fputc.s       
rck.s         
seekdir.s     
set.s         
strhp.s       
unknown.s     
adi.s         
cleanup.s     
closedir.s    
cuserid.s     
error.s       
fat.s         
fclose.s      
fgets.s       
fread.s       
fseek.s       
getlogin.s    
gets.s        
mon.s         
opendir.s     
readdir.s     
sbi.s         
setbuf.s      
strerror.s    
abort.s       
execlp.s      
fflush.s      
fgetc.s       
ftell.s       
getcwd.s      
getdents.s    
getgrent.s    
getpwent.s    
malloc.s      
mktemp.s      
perror.s      
rename.s      
rewinddir.s   
stderr.s      
stop.s        
system.s      
telldir.s     
trp.s         
ttyname.s     
access.s      
alarm.s       
brk.s         
brk2.s        
chdir.s       
chmod.s       
chown.s       
chroot.s      
close.s       
creat.s       
ctermid.s     
dup.s         
dup2.s        
exec.s        
exit.s        
fork.s        
fstat.s       
getegid.s     
geteuid.s     
getgid.s      
getpid.s      
getuid.s      
isatty.s      
kill.s        
link.s        
lsearch.s     
lseek.s       
mknod.s       
mount.s       
open.s        
pause.s       
pipe.s        
read.s        
regsub.s      
setgid.s      
setuid.s      
stat.s        
stime.s       
strcspn.s     
sync.s        
syslib.s      
time.s        
times.s       
umask.s       
umount.s      
unlink.s      
utime.s       
wait.s        
write.s       
abs.s         
atoi.s        
atol.s        
bcmp.s        
bcopy.s       
bsearch.s     
bzero.s       
call.s        
crypt.s       
ffs.s         
getenv.s      
index.s       
itoa.s        
lfr6.s        
lfr8.s        
lrand.s       
memccpy.s     
memchr.s      
memcmp.s      
memcpy.s      
memset.s      
qsort.s       
rand.s        
ret6.s        
ret8.s        
rindex.s      
stb.s         
strcat.s      
strchr.s      
strcmp.s      
strcpy.s      
strlen.s      
strncat.s     
strncmp.s     
strncpy.s     
strpbrk.s     
strrchr.s     
strspn.s      
strstr.s      
strtok.s      
swab.s        
ungetc.s      
_dup.s        
and.s         
blm.s         
brksize.s     
cmi4.s        
cms.s         
cmu4.s        
com.s         
ctype.s       
dvi4.s        
dvu4.s        
exg.s         
getutil.s     
gto.s         
inn.s         
ior.s         
lar2.s        
loi.s         
message.s     
mli4.s        
nop.s         
portio.s      
printdat.s    
retarea.s     
return.s      
rmi4.s        
rmu4.s        
sar2.s        
sendrec.s     
setjmp.s      
sti.s         
vars.s        
xor.s         

Robert R. Hall
hall@nosc.mil