%%s 0/0/0 %%d D 1.1 26-Mar-82 12:33:02 v1.1 1 0 %%c Version 1.1 is the Spring 1982 Distribution of the LBL/Hughes release %%c of the Software Tools Virtual Operating System software and documentation. %%T %%I 1 #-h- objfix.r 2735 asc 25-mar-82 07:34:47 v1.1 (sw-tools v1.1) #-h- defns 254 asc 25-mar-82 07:34:29 v1.1 (sw-tools v1.1) define(GSD_FLAG,1) define(EGSD_FLAG,2) define(MOD_TYPE,0) define(CSN_TYPE,1) define(ISN_TYPE,2) define(XFR_TYPE,3) define(GSN_TYPE,4) define(PSN_TYPE,5) define(PVI_TYPE,6) define(MAD_TYPE,7) define(CRD_TYPE,8) define(BUF_SIZE,5000) define(Mem_size,1000) #-h- main 913 asc 25-mar-82 07:34:29 v1.1 (sw-tools v1.1) DRIVER(objfix) integer n, i, flag, type, x, junk integer readf, writef, tblook character buf(BUF_SIZE), name(20), y, defn(10) equivalence (x,y) call query("usage: objfix output.obj [psect_file] ...") call init # load psect files for (n=readf(buf, BUF_SIZE, STDIN); n >= 0; n=readf(buf, BUF_SIZE, STDIN)) { if (n > 0) if (buf(1) == GSD_FLAG) for (i=3; i < n; i=i+8) { flag = i + 4 type = i + 5 if (buf(type) == PSN_TYPE) { call fmt(buf(i), name) if (tblook(name, defn) == YES) { x = 0 y = buf(flag) x = ior(x, 8%20) buf(flag) = y } call putlin(name, ERROUT) call putch(' ', ERROUT) call pchar(buf(flag), ERROUT) call putch('@n', ERROUT) } } junk = writef(buf, n, STDOUT) } DRETURN end #-h- doit 177 asc 25-mar-82 07:34:30 v1.1 (sw-tools v1.1) subroutine doit(i, zero, one, int) integer i, int character zero(ARB), one(ARB) if (mod(i,2) == 0) call putlin(zero, int) else call putlin(one, int) i = i / 2 return end #-h- fmt 128 asc 25-mar-82 07:34:31 v1.1 (sw-tools v1.1) subroutine fmt(buf, str) character str(ARB), buf(ARB) call r50asc(6, buf, str) str(7) = EOS call fold(str) return end #-h- pchar 339 asc 25-mar-82 07:34:31 v1.1 (sw-tools v1.1) subroutine pchar(n, int) character n, x integer i equivalence (x, i) i = 0 x = n i = i / 4 # not interested in bits 0 and 1 call doit(i, "CON ", "OVR ", int) i = i / 2 # skip bit 3 call doit(i, "RW ", "RO ", int) call doit(i, "ABS ", "REL ", int) call doit(i, "LCL ", "GBL ", int) call doit(i, "I", "D", int) return end #-h- init 486 asc 25-mar-82 07:34:32 v1.1 (sw-tools v1.1) subroutine init character buf(MAXLINE) integer i, n integer getarg, getlin, length filedes fd filedes open DS_DECL(Mem,Mem_size) string null "" call tbinit(Mem_size) for (i=1; getarg(i, buf, FILENAMESIZE) != EOF; i=i+1) { fd = open(buf, READ) if (fd == ERR) call cant(buf) while (getlin(buf, fd) != EOF) { for (n=length(buf); n <= 6; n=n+1) buf(n) = ' ' buf(n) = EOS call fold(buf) call tbinst(buf, null) } call close(fd) } return end #-h- objfix.fmt 872 asc 25-mar-82 07:34:50 v1.1 (sw-tools v1.1) .so ~bin/manhdr .hd Objfix (1) 2-May-81 fixup object modules for building multi-user tasks .sy objfix output.obj [psect_file] ... .ds `objfix' converts one object module to another, flagging as read-only those psects which have been specified in the psect files specified in the command line. Each psect name, along with its attributes, is displayed on error output as each record is written to standard output. .sp The format of the psect files are quite simple: each line is taken to be the name of one psect to be flagged as read only. .sp `objfix' can be used to list the psects and their attributes of an object file using the following command line: .sp .ce objfix nl: .sp You can cause `objfix' to stop reporting the psect information by typing control-O (^O). .fl None .sa .nf mubld - build a multi-user task .fi .di .au Joe Sventek .bu %%E 1