Ranlib problem in 4.1BSD
win at msdc.UUCP
win at msdc.UUCP
Tue Nov 8 07:31:07 AEST 1983
On our VAX 750 running 4.1BSD if you are trying to ranlib an object
archive and the currently existing __.SYMDEF happens to have the
correct lucky number in it, ranlib will calmly give up and tell you:
ranlib: archive.a (__.SYMDEF): old format .o file
This happens when the first octal number in the currently existing
__.SYMDEF file is a magic number. Rather than skip this file in the
loop, ranlib continues on causing the above mentioned error to
happen.
Below is a simple patch to fix this problem when the first octal
number in __.SYMDEF happens to be a "magic" number.
Diffs follow:
*************** ( old ranlib.c )
*** 64,69
fread((char *)&exp, 1, sizeof(struct exec), fi);
if (N_BADMAG(exp))
continue;
if (exp.a_syms == 0) {
fprintf(stderr, "ranlib: warning: %s(%s): no symbol table\n", *argv, archdr.ar_name);
--- 65,74 ----- ( new ranlib.c )
fread((char *)&exp, 1, sizeof(struct exec), fi);
+ #ifdef ORIGINAL
if (N_BADMAG(exp))
+ #else
+ if (N_BADMAG(exp) ||
+ strcmp(archdr.ar_name,"__.SYMDEF") == 0)
+ #endif
continue;
if (exp.a_syms == 0) {
fprintf(stderr, "ranlib: warning: %s(%s): no symbol table\n", *argv, archdr.ar_name);
Win Strickland, Jr.
Medical Systems Development Corporation
...!allegra!akgua!msdc!win
More information about the Comp.bugs.4bsd.ucb-fixes
mailing list