* | <UNUSED> | /
* |________________________|
* | |
+ * | PROCTABLE |
+ * | |
+ * |_ _ _ _ _ _ _ _ _ _ _ _ |
+ * | |
* | TEXT | zero filled
* | | if not word multiple
* |________________________|
* | DATA |
* | |
* |________________________|
- * | |
- * | PROCTABLE |
- * | |
- * |________________________|
*
*
*/
+ procbytes = procnum * 3 * ptrsize;
remtext = textbytes%wordsize ;
if ( remtext != 0 ) remtext = wordsize-remtext ;
xput16(ptrsize,ifile);
xput16(0,ifile);
xput16(0,ifile);
- xputa(textbytes+remtext ,ifile);
+ xputa(procbytes+textbytes+remtext,ifile);
xputa((cons_t)datablocks,ifile);
xputa((cons_t)procnum,ifile);
xputa((cons_t)searchproc(MAIN,xprocs,oursize->n_xproc)->p_num,
xputa((cons_t)0,ifile);
xputa((cons_t)0,ifile);
+ for (i=0;i<procnum;i++) {
+ xputarb(ptrsize,proctab[i].pr_loc,ifile);
+ xputarb(ptrsize,proctab[i].pr_off+procbytes,ifile);
+ xputarb(ptrsize,proctab[i].pr_len,ifile);
+ }
+
textprocess(tfile,ifile);
while ( remtext-- ) xputc(0,ifile) ;
dataprocess(dfile,ifile);
- for (i=0;i<procnum;i++) {
- xputarb(ptrsize,proctab[i].pr_loc,ifile);
- xputarb(ptrsize,proctab[i].pr_off,ifile);
- }
if ( fclose(ifile)==EOF ) ;
}
for (i=0 ; i<dataoff && !ieof ; i++) {
if (i==datareloc.r_off) {
switch(datareloc.r_typ) {
+ case RELLOC:
+ datareloc.r_val.rel_i += procbytes;
+ /* fallthru */
case RELADR:
xputa(xgeta(f1)+datareloc.r_val.rel_i,f2) ;
i += ptrsize-1 ;