summary |
tags |
clone url |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
ed84d47)
SCCS-vsn: old/as.vax/as.h 4.5
SCCS-vsn: old/as.vax/assyms.c 4.3
/* Copyright (c) 1980 Regents of the University of California */
/* Copyright (c) 1980 Regents of the University of California */
-/* "@(#)as.h 4.4 %G%" */
+/* "@(#)as.h 4.5 %G%" */
#ifdef VMS
# define vax 1
# define VAX 1
#ifdef VMS
# define vax 1
# define VAX 1
extern int orgwarn; /* questionable origin ? */
extern int useVM; /*use virtual memory temp file*/
extern int jxxxJUMP; /*use jmp instead of brw for jxxx */
extern int orgwarn; /* questionable origin ? */
extern int useVM; /*use virtual memory temp file*/
extern int jxxxJUMP; /*use jmp instead of brw for jxxx */
+ extern int readonlydata; /*initialized data into text space*/
#ifdef DEBUG
extern int debug;
extern int toktrace;
#ifdef DEBUG
extern int debug;
extern int toktrace;
/* Copyright (c) 1980 Regents of the University of California */
/* Copyright (c) 1980 Regents of the University of California */
-static char sccsid[] = "@(#)assyms.c 4.2 %G%";
+static char sccsid[] = "@(#)assyms.c 4.2 8/15/80";
#include <stdio.h>
#include <ctype.h>
#include "as.h"
#include <stdio.h>
#include <ctype.h>
#include "as.h"
if (reltype != XABS || reftype & PCREL) {
reloc = (reftype & PCREL)? r_can_1PC : r_can_0PC;
reloc.r_address = dotp->e_xvalue -
if (reltype != XABS || reftype & PCREL) {
reloc = (reftype & PCREL)? r_can_1PC : r_can_0PC;
reloc.r_address = dotp->e_xvalue -
- ( (dotp < &usedot[NLOC]) ? 0 : datbase );
+ ( (dotp < &usedot[NLOC] || readonlydata) ? 0 : datbase );
reloc.r_length = lgreflen[reftype];
switch(reltype){
case XXTRN | XUNDEF:
reloc.r_length = lgreflen[reftype];
switch(reltype){
case XXTRN | XUNDEF:
reloc.r_extern = 1;
break;
default:
reloc.r_extern = 1;
break;
default:
+ if (readonlydata && (reltype&~XXTRN) == XDATA)
+ reltype = XTEXT | (reltype&XXTRN);
reloc.r_symbolnum = reltype;
break;
}
reloc.r_symbolnum = reltype;
break;
}
}
#endif
sp->s_type = (sp->s_ptype != 0) ? sp->s_ptype : (sp->s_type & (~XFORW));
}
#endif
sp->s_type = (sp->s_ptype != 0) ? sp->s_ptype : (sp->s_type & (~XFORW));
+ if (readonlydata && (sp->s_type&~N_EXT) == N_DATA)
+ sp->s_type = N_TEXT | (sp->s_type & N_EXT);
bwrite(&sp->s_nm, sizeof (struct nlist), symfile);
#ifdef FLEXNAMES
sp->s_name = name; /* restore pointer */
bwrite(&sp->s_nm, sizeof (struct nlist), symfile);
#ifdef FLEXNAMES
sp->s_name = name; /* restore pointer */