Bell 32V development
[unix-history] / usr / src / cmd / strip.c
index 80890c9..8ef4a63 100644 (file)
@@ -54,13 +54,12 @@ char *name;
                status = 1;
                goto out;
        }
                status = 1;
                goto out;
        }
-       if(head.a_syms == 0 && (head.a_flag&1) != 0) {
+       if ((head.a_syms == 0) && (head.a_trsize == 0) && (head.a_drsize ==0)) {
                printf("%s already stripped\n", name);
                goto out;
        }
        size = (long)head.a_text + head.a_data;
                printf("%s already stripped\n", name);
                goto out;
        }
        size = (long)head.a_text + head.a_data;
-       head.a_syms = 0;
-       head.a_flag |= 1;
+       head.a_syms = head.a_trsize = head.a_drsize = 0 ;
 
        lseek(tf, (long)0, 0);
        write(tf, (char *)&head, sizeof(head));
 
        lseek(tf, (long)0, 0);
        write(tf, (char *)&head, sizeof(head));