ham@Neon.Stanford.EDU (Peter R. Ham) (09/14/89)
*** /xxV/cmds/gasnew/pgas/mi/a.out.h Wed Sep 13 17:24:15 1989 --- /xxV/cmds/gasnew/dist/a.out.h Wed Sep 6 10:36:56 1989 *************** *** 1,310 **** ! #ifndef __A_OUT_GNU_H__ ! #define __A_OUT_GNU_H__ ! #define __GNU_EXEC_MACROS__ ! #ifndef __STRUCT_EXEC_OVERRIDE__ ! #ifdef WITH_PERPROCESS_VARIABLES ! struct exec ! { ! unsigned long a_info; /* Use macros N_MAGIC, etc for access */ ! unsigned a_text; /* length of text, in bytes */ ! unsigned a_data; /* length of data, in bytes */ ! unsigned a_bss; /* length of uninitialized data area for file, in bytes */ ! unsigned a_perprocess; /* length of perprocess, in bytes */ ! unsigned a_perprocess_bss; /* length of uninitialized perprocess area for file, in bytes */ ! unsigned a_syms; /* length of symbol table data in file, in bytes */ ! unsigned a_entry; /* start address */ ! unsigned a_trsize; /* length of relocation info for text, in bytes */ ! unsigned a_drsize; /* length of relocation info for data, in bytes */ ! unsigned a_prsize; /* length of relocation info for perprocess, in bytes */ ! }; ! /* ! ** Macro definitions for V system compatibility. ! */ ! #define bhdr exec ! #define tsize a_text ! #define dsize a_data ! #else ! struct exec ! { ! unsigned long a_info; /* Use macros N_MAGIC, etc for access */ ! unsigned a_text; /* length of text, in bytes */ ! unsigned a_data; /* length of data, in bytes */ ! unsigned a_bss; /* length of uninitialized data area for file, in bytes */ ! unsigned a_syms; /* length of symbol table data in file, in bytes */ ! unsigned a_entry; /* start address */ ! unsigned a_trsize; /* length of relocation info for text, in bytes */ ! unsigned a_drsize; /* length of relocation info for data, in bytes */ ! }; ! #endif WITH_PERPROCESS_VARIABLES - #endif /* __STRUCT_EXEC_OVERRIDE__ */ - - /* these go in the N_MACHTYPE field */ - enum machine_type { - M_OLDSUN2 = 0, - M_68010 = 1, - M_68020 = 2, - M_SPARC = 3, - /* skip a bunch so we don't run into any of sun's numbers */ - M_386 = 100, - }; - - #define N_MAGIC(exec) ((exec).a_info) - #define N_MACHTYPE(exec) ((enum machine_type)(((exec).a_info >> 16) & 0xff)) - #define N_FLAGS(exec) (((exec).a_info >> 24) & 0xff) - #define N_SET_INFO(exec, magic, type, flags) \ - ((exec).a_info = ((magic) & 0xffff) \ - | (((int)(type) & 0xff) << 16) \ - | (((flags) & 0xff) << 24)) - #if 0 - /* - ** This macro is not used by - ** the V system. - */ - #define N_SET_MAGIC(exec, magic) \ - ((exec).a_info = (((exec).a_info & 0xffff0000) | ((magic) & 0xffff))) - #endif - #define N_SET_MAGIC(exec, magic) \ - ((exec).a_info = (magic)) - - #define N_SET_MACHTYPE(exec, machtype) \ - ((exec).a_info = \ - ((exec).a_info&0xff00ffff) | ((((int)(machtype))&0xff) << 16)) - - #define N_SET_FLAGS(exec, flags) \ - ((exec).a_info = \ - ((exec).a_info&0x00ffffff) | (((flags) & 0xff) << 24)) - - /* Code indicating object file or impure executable. */ - #ifdef WITH_PERPROCESS_VARIABLES - #define PERPROCESS_SEGMENT_OBJECT_MAGIC 0420 - #define OMAGIC PERPROCESS_SEGMENT_OBJECT_MAGIC - #else #define OMAGIC 0407 - #endif WITH_PERPROCESS_VARIABLES - - /* Code indicating pure executable. */ #define NMAGIC 0410 ! /* Code indicating demand-paged executable. */ ! /* ! ** This is different for the V system. ! */ ! #define PROC_FAM_68000 0 /* 68000 family */ ! #define PROC_FAM_VAX11 1 /* VAX family */ ! #define BuildMagic(format, family) ((0x80|'V')<<24|((format)<<16)|(family)) ! #define DEMAND_PAGEABLE 42 /* Text and data aligned on 1k boundaries */ ! #define VMAGIC_M68K BuildMagic(DEMAND_PAGEABLE,PROC_FAM_68000) ! #define VMAGIC_VAX BuildMagic(DEMAND_PAGEABLE,PROC_FAM_VAX11) ! #ifdef WITH_PERPROCESS_VARIABLES ! #define PERPROCESS_SEGMENT (64|DEMAND_PAGEABLE) ! /* Additional "perprocess" segment */ - #define VPERPROCESS_MAGIC_VAX BuildMagic(PERPROCESS_SEGMENT,PROC_FAM_VAX11) - #define VPERPROCESS_MAGIC_M68K BuildMagic(PERPROCESS_SEGMENT,PROC_FAM_68000) - #define VPERPROCESS_MAGIC_PMAX BuildMagic(PERPROCESS_SEGMENT,PROC_FAM_MIPSCO) - - #ifdef m68k - #define ZMAGIC VPERPROCESS_MAGIC_M68K - #endif - - #ifdef VAX - #define ZMAGIC VPERPROCESS_MAGIC_VAX - #endif - - #else WITH_PERPROCESS_VARIABLES - #ifdef m68k - #define ZMAGIC VMAGIC_M68K - #endif - - #ifdef VAX - #define ZMAGIC VMAGIC_VAX - #endif - #endif WITH_PERPROCESS_VARIABLES - - #define N_BADMAG(x) \ - (N_MAGIC(x) != OMAGIC && N_MAGIC(x) != NMAGIC \ - && N_MAGIC(x) != ZMAGIC) - - #define _N_BADMAG(x) \ - (N_MAGIC(x) != OMAGIC && N_MAGIC(x) != NMAGIC \ - && N_MAGIC(x) != ZMAGIC) - - #define _N_HDROFF(x) (SEGMENT_SIZE - sizeof (struct exec)) - #define N_TXTOFF(x) \ ! (N_MAGIC(x) == ZMAGIC ? _N_HDROFF((x)) + sizeof (struct exec) : sizeof (struct exec)) ! #define N_DATOFF(x) (N_TXTOFF(x) + (x).a_text) ! #ifdef WITH_PERPROCESS_VARIABLES ! #define N_PEROFF(x) (N_DATOFF(x) + (x).a_data) - #define N_TRELOFF(x) (N_PEROFF(x) + (x).a_perprocess) - #else - #define N_TRELOFF(x) (N_DATOFF(x) + (x).a_data) - #endif WITH_PERPROCESS_VARIABLES - - #define N_DRELOFF(x) (N_TRELOFF(x) + (x).a_trsize) - - #ifdef WITH_PERPROCESS_VARIABLES - #define N_PRELOFF(x) (N_DRELOFF(x) + (x).a_drsize) - #define N_SYMOFF(x) (N_PRELOFF(x) + (x).a_prsize) - #else - #define N_SYMOFF(x) (N_DRELOFF(x) + (x).a_drsize) - #endif WITH_PERPROCESS_VARIABLES - - #define N_STROFF(x) (N_SYMOFF(x) + (x).a_syms) - - /* Address of text segment in memory after it is loaded. */ - #ifndef m68k - #define N_TXTADDR(x) 0 - #else - #define N_TXTADDR(x) 0x40000 - #endif - - #define PAGE_SIZE SEGMENT_SIZE - - /* Address of data segment in memory after it is loaded. - Note that it is up to you to define SEGMENT_SIZE - on machines not listed here. */ - - #ifdef VAX - #define SEGMENT_SIZE 1024 - #endif - /* ???? #undef vax Should this be here? */ - #ifdef is68k - #define SEGMENT_SIZE 0x20000 - #endif - - #ifdef m68k - #define SEGMENT_SIZE (1024 * 8) - #endif - - #ifndef N_DATADDR - #define N_DATADDR(x) \ - (N_MAGIC(x)==OMAGIC? (N_TXTADDR(x)+(x).a_text) \ - : (SEGMENT_SIZE + ((N_TXTADDR(x)+(x).a_text-1) & ~(SEGMENT_SIZE-1)))) - #endif - - /* Address of bss segment in memory after it is loaded. */ - #define N_BSSADDR(x) (N_DATADDR(x) + (x).a_data) - - #ifdef WITH_PERPROCESS_VARIABLES - #define N_PERPROCESS_ADDR(x) ( N_BSS_ADDR(x) + (x).a_bss ) - - #define N_PERPROCESS_BSS_ADDR(x) ( N_PERPROCESS_ADDR(x) + (x).a_perprocess ) - #endif WITH_PERPROCESS_VARIABLES - - struct nlist { ! union { ! char *n_name; ! struct nlist *n_next; ! long n_strx; ! } n_un; ! unsigned char n_type; ! char n_other; ! short n_desc; ! unsigned long n_value; }; ! #define N_UNDF 0 ! #define N_ABS 2 ! #define N_TEXT 4 ! #define N_DATA 6 ! #define N_BSS 8 ! #define N_FN 15 - #ifdef WITH_PERPROCESS_VARIABLES - #define N_PERPROCESS 0xc /* These last two defines may overlap with some others. */ - #define N_PERPROCESS_BSS 0xe /* N_INDR is 0xa, I don't know what else follows in - stabs.h or something. I'm pretty sure that the - next one is 0x20 for gensym (sp.) stab or - 0x14 for the set symbols. I think that the - assembler uses these so it will have to be - recompiled. */ - #endif WITH_PERPROCESS_VARIABLES - #define N_EXT 1 #define N_TYPE 036 #define N_STAB 0340 ! /* The following type indicates the definition of a symbol as being ! an indirect reference to another symbol. The other symbol ! appears as an undefined reference, immediately following this symbol. ! ! Indirection is asymmetrical. The other symbol's value will be used ! to satisfy requests for the indirect symbol, but not vice versa. ! If the other symbol does not have a definition, libraries will ! be searched to find a definition. */ ! #define N_INDR 0xa ! ! /* The following symbols refer to set elements. ! All the N_SET[ATDB] symbols with the same name form one set. ! Space is allocated for the set in the text section, and each set ! element's value is stored into one word of the space. ! The first word of the space is the length of the set (number of elements). ! ! The address of the set is made into an N_SETV symbol ! whose name is the same as the name of the set. ! This symbol acts like a N_DATA global symbol ! in that it can satisfy undefined external references. */ ! ! /* These appear as input to LD, in a .o file. */ ! #define N_SETA 0x14 /* Absolute set element symbol */ ! #define N_SETT 0x16 /* Text set element symbol */ ! #define N_SETD 0x18 /* Data set element symbol */ ! #define N_SETB 0x1A /* Bss set element symbol */ ! #ifdef WITH_PERPROCESS_VARIABLES ! #define N_SETP 0x1E /* Peprocess set element symbol */ ! #define N_SETPB 0x20 /* Perprocess bss set element symbol */ ! #endif WITH_PERPROCESS_VARIABLES ! ! /* This is output from LD. */ ! #define N_SETV 0x1C /* Pointer to set vector in data area. */ ! ! /* This structure describes a single relocation to be performed. ! The text-relocation section of the file is a vector of these structures, ! all of which apply to the text section. ! Likewise, the data-relocation section applies to the data section. */ ! ! struct relocation_info ! { ! /* Address (within segment) to be relocated. */ ! int r_address; ! /* The meaning of r_symbolnum depends on r_extern. */ ! unsigned int r_symbolnum:24; ! /* Nonzero means value is a pc-relative offset ! and it should be relocated for changes in its own address ! as well as for changes in the symbol or section specified. */ ! unsigned int r_pcrel:1; ! /* Length (as exponent of 2) of the field to be relocated. ! Thus, a value of 2 indicates 1<<2 bytes. */ ! unsigned int r_length:2; ! /* 1 => relocate with value of symbol. ! r_symbolnum is the index of the symbol ! in file's the symbol table. ! 0 => relocate with the address of a segment. ! r_symbolnum is N_TEXT, N_DATA, N_BSS or N_ABS ! (the N_EXT bit may be set also, but signifies nothing). */ ! unsigned int r_extern:1; ! #ifdef WITH_PERPROCESS_VARIABLES ! unsigned int r_bsr:1, /* OVE: used on ns32k based systems, if you want */ ! r_disp:1, /* OVE: used on ns32k based systems, if you want */ ! nuthin:2; ! #else WITH_PERPROCESS_VARIABLES ! /* Four bits that aren't used, but when writing an object file ! it is desirable to clear them. */ ! unsigned int r_pad:4; ! #endif WITH_PERPROCESS_VARIABLES }; - - - #endif /* __A_OUT_GNU_H__ */ --- 1,84 ---- ! /* This file describes the a.out file format ! Copyright (C) 1987 Free Software Foundation, Inc. ! This file is part of GAS, the GNU Assembler. ! GAS is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 1, or (at your option) ! any later version. ! GAS is distributed in the hope that it will be useful, ! but WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! GNU General Public License for more details. ! You should have received a copy of the GNU General Public License ! along with GAS; see the file COPYING. If not, write to ! the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ ! /* JF I'm not sure where this file came from. I put the permit.text message in ! it anyway. This file came to me as part of the original VAX assembler */ #define OMAGIC 0407 #define NMAGIC 0410 ! #define ZMAGIC 0413 ! struct exec { ! long a_magic; /* number identifies as .o file and gives type of such. */ ! unsigned a_text; /* length of text, in bytes */ ! unsigned a_data; /* length of data, in bytes */ ! unsigned a_bss; /* length of uninitialized data area for file, in bytes */ ! unsigned a_syms; /* length of symbol table data in file, in bytes */ ! unsigned a_entry; /* start address */ ! unsigned a_trsize; /* length of relocation info for text, in bytes */ ! unsigned a_drsize; /* length of relocation info for data, in bytes */ ! }; ! #define N_BADMAG(x) \ ! (((x).a_magic)!=OMAGIC && ((x).a_magic)!=NMAGIC && ((x).a_magic)!=ZMAGIC) #define N_TXTOFF(x) \ ! ((x).a_magic == ZMAGIC ? 1024 : sizeof(struct exec)) ! #define N_SYMOFF(x) \ ! (N_TXTOFF(x) + (x).a_text + (x).a_data + (x).a_trsize + (x).a_drsize) ! #define N_STROFF(x) \ ! (N_SYMOFF(x) + (x).a_syms) struct nlist { ! union { ! char *n_name; ! struct nlist *n_next; ! long n_strx; ! } n_un; ! char n_type; ! char n_other; ! short n_desc; ! unsigned n_value; }; ! #define N_UNDF 0 ! #define N_ABS 2 ! #define N_TEXT 4 ! #define N_DATA 6 ! #define N_BSS 8 ! #define N_FN 31 /* JF: Someone claims this should be 31 instead of ! 15. I just inherited this file; I didn't write ! it. Who is right? */ #define N_EXT 1 #define N_TYPE 036 #define N_STAB 0340 ! struct relocation_info { ! int r_address; ! unsigned r_symbolnum:24, ! r_pcrel:1, ! r_length:2, ! r_extern:1, ! r_bsr:1, /* OVE: used on ns32k based systems, if you want */ ! r_disp:1, /* OVE: used on ns32k based systems, if you want */ ! nuthin:2; }; *** /xxV/cmds/gasnew/pgas/mi/as.c Wed Sep 13 17:24:17 1989 --- /xxV/cmds/gasnew/dist/as.c Tue Aug 8 13:43:51 1989 *************** *** 222,231 **** text_fix_root = NULL; data_fix_root = NULL; - #ifdef WITH_PERPROCESS_VARIABLES - perprocess_fix_root = NULL; - #endif WITH_PERPROCESS_VARIABLES - need_pass_2 = FALSE; argv++; /* skip argv[0] */ --- 222,227 ---- *** /xxV/cmds/gasnew/pgas/mi/as.h Fri Sep 8 14:28:18 1989 --- /xxV/cmds/gasnew/dist/as.h Tue Aug 8 13:43:53 1989 *************** *** 130,140 **** * SEG_BSS * 0 * SEG_UNKNOWN * 0 * SEG_DIFFERENCE 0 * 0 - #ifdef WITH_PERPROCESS_VARIABLES - * SEG_PERPROCESS * 0 - * SEG_PERPROCESS_BSS * 0 - #endif WITH_PERPROCESS_VARIABLES - * * The blank fields MUST be 0, and are nugatory. * The '0' fields MAY be 0. The '*' fields MAY NOT be 0. --- 130,135 ---- *************** *** 156,165 **** SEG_TEXT, SEG_DATA, SEG_BSS, - #ifdef WITH_PERPROCESS_VARIABLES - SEG_PERPROCESS, - SEG_PERPROCESS_BSS, - #endif WITH_PERPROCESS_VARIABLES SEG_UNKNOWN, SEG_NONE, /* Mythical Segment: NO expression seen. */ SEG_PASS1, /* Mythical Segment: Need another pass. */ --- 151,156 ---- *************** *** 180,191 **** COMMON segT now_seg; /* Segment our instructions emit to. */ /* Only OK values are SEG_TEXT or SEG_DATA. */ - #ifdef WITH_PERPROCESS_VARIABLES - /* or SEG_PERPROCESS. */ - #endif WITH_PERPROCESS_VARIABLES - extern char *seg_name[]; extern int seg_N_TYPE[]; extern segT N_TYPE_seg[]; --- 171,178 ---- *************** *** 277,289 **** COMMON fragS zero_address_frag; /* For foreign-segment symbol fixups. */ COMMON fragS bss_address_frag; /* For local common (N_BSS segment) fixups. */ - #ifdef WITH_PERPROCESS_VARIABLES - /* - ** Is this frag ever used? - */ - COMMON fragS perprocess_bss_address_frag; - #endif WITH_PERPROCESS_VARIABLES - void frag_new(); char * frag_more(); --- 264,269 ---- *** /xxV/cmds/gasnew/pgas/mi/expr.c Wed Sep 13 17:24:23 1989 --- /xxV/cmds/gasnew/dist/expr.c Tue Aug 8 13:44:13 1989 *************** *** 438,447 **** case SEG_TEXT: case SEG_DATA: case SEG_BSS: - #ifdef WITH_PERPROCESS_VARIABLES - case SEG_PERPROCESS: - case SEG_PERPROCESS_BSS: - #endif WITH_PERPROCESS_VARIABLES case SEG_PASS1: case SEG_UNKNOWN: if(c=='-') { /* JF I hope this hack works */ --- 438,443 ---- *************** *** 517,526 **** case SEG_TEXT: case SEG_DATA: case SEG_BSS: - #ifdef WITH_PERPROCESS_VARIABLES - case SEG_PERPROCESS: - case SEG_PERPROCESS_BSS: - #endif WITH_PERPROCESS_VARIABLES case SEG_UNKNOWN: expressionP -> X_subtract_symbol = NULL; break; --- 513,518 ---- *************** *** 630,641 **** } know( return_value == SEG_ABSOLUTE || return_value == SEG_TEXT ! || return_value == SEG_DATA || return_value == SEG_BSS - #ifdef WITH_PERPROCESS_VARIABLES - || return_value == SEG_PERPROCESS - || return_value == SEG_PERPROCESS_BSS - #endif WITH_PERPROCESS_VARIABLES || return_value == SEG_UNKNOWN || return_value == SEG_PASS1 ); --- 622,629 ---- } know( return_value == SEG_ABSOLUTE || return_value == SEG_TEXT ! || return_value == SEG_DATA || return_value == SEG_BSS || return_value == SEG_UNKNOWN || return_value == SEG_PASS1 ); *************** *** 822,833 **** know( resultP -> X_seg == SEG_DATA || resultP -> X_seg == SEG_TEXT ! || resultP -> X_seg == SEG_BSS ! #ifdef WITH_PERPROCESS_VARIABLES ! || resultP -> X_seg == SEG_PERPROCESS ! || resultP -> X_seg == SEG_PERPROCESS_BSS ! #endif WITH_PERPROCESS_VARIABLES ! || resultP -> X_seg == SEG_UNKNOWN || resultP -> X_seg == SEG_DIFFERENCE || resultP -> X_seg == SEG_ABSOLUTE --- 810,816 ---- know( resultP -> X_seg == SEG_DATA || resultP -> X_seg == SEG_TEXT ! || resultP -> X_seg == SEG_BSS || resultP -> X_seg == SEG_UNKNOWN || resultP -> X_seg == SEG_DIFFERENCE || resultP -> X_seg == SEG_ABSOLUTE *************** *** 836,845 **** know( right . X_seg == SEG_DATA || right . X_seg == SEG_TEXT || right . X_seg == SEG_BSS - #ifdef WITH_PERPROCESS_VARIABLES - || resultP -> X_seg == SEG_PERPROCESS - || resultP -> X_seg == SEG_PERPROCESS_BSS - #endif WITH_PERPROCESS_VARIABLES || right . X_seg == SEG_UNKNOWN || right . X_seg == SEG_DIFFERENCE || right . X_seg == SEG_ABSOLUTE --- 819,824 ---- *************** *** 872,892 **** && seg2 != SEG_UNKNOWN && seg1 != seg2) { - #ifdef WITH_PERPROCESS_VARIABLES - know( seg1 == SEG_TEXT - || seg1 == SEG_DATA - || seg1== SEG_BSS - || seg1 == SEG_PERPROCESS - || seg1 == SEG_PERPROCESS); - know( seg2 == SEG_TEXT - || seg2 == SEG_DATA - || seg2== SEG_BSS - || seg2 == SEG_PERPROCESS - || seg2 == SEG_PERPROCESS); - #else WITH_PERPROCESS_VARIABLES know( seg1 == SEG_TEXT || seg1 == SEG_DATA || seg1== SEG_BSS ); know( seg2 == SEG_TEXT || seg2 == SEG_DATA || seg2== SEG_BSS ); - #endif WITH_PERPROCESS_VARIABLES know( resultP -> X_add_symbol ); know( resultP -> X_subtract_symbol ); as_warn("Expression too complex: forgetting %s - %s", --- 851,858 ---- *** /xxV/cmds/gasnew/pgas/mi/read.c Tue Sep 5 17:38:36 1989 --- /xxV/cmds/gasnew/dist/read.c Thu Aug 17 11:29:38 1989 *************** *** 162,171 **** void s_org(), s_set(), s_space(), s_text(); void s_gdbline(), s_gdblinetab(); - #ifdef WITH_PERPROCESS_VARIABLES - void s_perprocess(), s_perprocess_bss(), s_perprocess_comm(), s_perprocess_lcomm(); - #endif WITH_PERPROCESS_VARIABLES - void stringer(); void cons(); void float_cons(); --- 162,167 ---- *************** *** 201,218 **** { "lsym", s_lsym, 0 }, { "octa", big_cons, 16 }, { "org", s_org, 0 }, - - #ifdef WITH_PERPROCESS_VARIABLES - { "perprocess",s_perprocess, 0 }, - { "perprocess_bss",s_perprocess_bss, 0 }, - { "perprocess_comm",s_perprocess_comm, 0 }, - /* - ** This directive doesn't seem ever be used by the - ** compiler. - ** { "perprocess_lcomm",s_perprocess_lcomm, 0 }, - */ - #endif WITH_PERPROCESS_VARIABLES - { "quad", big_cons, 8 }, { "set", s_set, 0 }, { "short", cons, 2 }, --- 197,202 ---- *************** *** 603,729 **** demand_empty_rest_of_line(); } - #ifdef WITH_PERPROCESS_VARIABLES void - s_perprocess() - { - register int temp; - - temp = get_absolute_expression (); - subseg_new (SEG_PERPROCESS, (subsegT)temp); - demand_empty_rest_of_line(); - } - - /* - ** I'm just putting this function in now, so I don't know if it will - ** work. - */ - void - s_perprocess_comm() - { - register char *name; - register char c; - register char *p; - register int temp; - register symbolS * symbolP; - - name = input_line_pointer; - c = get_symbol_end(); - /* just after name is now '\0' */ - p = input_line_pointer; - *p = c; - SKIP_WHITESPACE(); - if ( * input_line_pointer != ',' ) { - as_warn("Expected comma after symbol-name"); - ignore_rest_of_line(); - return; - } - input_line_pointer ++; /* skip ',' */ - if ( (temp = get_absolute_expression ()) < 0 ) { - as_warn(".PERPROCESS_COMMon length (%d.) <0! Ignored.", temp); - ignore_rest_of_line(); - return; - } - *p = 0; - symbolP = symbol_find_or_make (name); - - /* - ** This seems like a kludge, but I will try it out. - */ - symbolP->sy_type = N_PERPROCESS_BSS; - - *p = c; - - /* - ** This line always produces complaints and returns, but the - ** thing seems to work so far. - ** I'm leaving it for now. Actually, it doesn't work. - */ - /* if ( (symbolP -> sy_type & N_TYPE) != N_UNDF || - symbolP -> sy_other != 0 || symbolP -> sy_desc != 0) { - as_warn( "Ignoring attempt to re-define symbol"); - ignore_rest_of_line(); - return; - }*/ - if (symbolP -> sy_value) { - if (symbolP -> sy_value != temp) - as_warn( "Length of .perprocess_comm \"%s\" is already %d. Not changed to %d.", - symbolP -> sy_name, symbolP -> sy_value, temp); - } else { - symbolP -> sy_value = temp; - symbolP -> sy_type |= N_EXT; - } - know( symbolP -> sy_frag == &zero_address_frag ); - demand_empty_rest_of_line(); - } - - void - s_perprocess_bss() - { - register char *name; - register char c; - register char *p; - register int temp; - register symbolS * symbolP; - - name = input_line_pointer; - c = get_symbol_end(); - p = input_line_pointer; - *p = c; - SKIP_WHITESPACE(); - if ( * input_line_pointer != ',' ) { - as_warn("Expected comma after name"); - ignore_rest_of_line(); - return; - } - input_line_pointer ++; - if ( (temp = get_absolute_expression ()) < 0 ) { - as_warn("PERPROCESS_BSS length (%d.) <0! Ignored.", temp); - ignore_rest_of_line(); - return; - } - *p = 0; - symbolP = symbol_find_or_make (name); - *p = c; - if ( symbolP -> sy_other == 0 - && symbolP -> sy_desc == 0 - && ( ( symbolP -> sy_type == N_PERPROCESS_BSS - && symbolP -> sy_value == local_perprocess_bss_counter) - || ( (symbolP -> sy_type & N_TYPE) == N_UNDF - && symbolP -> sy_value == 0))) { - symbolP -> sy_value = local_perprocess_bss_counter; - symbolP -> sy_type |= N_PERPROCESS_BSS; - symbolP -> sy_frag = & perprocess_bss_address_frag; - local_perprocess_bss_counter += temp; - } else - as_warn( "Ignoring attempt to re-define symbol from %d. to %d.", - symbolP -> sy_value, local_perprocess_bss_counter ); - demand_empty_rest_of_line(); - } - - #endif WITH_PERPROCESS_VARIABLES - - void s_desc() { register char *name; --- 587,593 ---- *************** *** 1537,1546 **** case SEG_UNKNOWN: case SEG_TEXT: case SEG_DATA: - #ifdef WITH_PERPROCESS_VARIABLES - case SEG_PERPROCESS: - case SEG_PERPROCESS_BSS: - #endif WITH_PERPROCESS_VARIABLES #ifdef SPARC fix_new (frag_now, p - frag_now -> fr_literal, nbytes, exp . X_add_symbol, exp . X_subtract_symbol, --- 1401,1406 ---- *************** *** 1951,1959 **** expP -> X_add_symbol = expP -> X_subtract_symbol = 0; } return (retval); /* SEG_ ABSOLUTE,UNKNOWN,DATA,TEXT,BSS */ - #ifdef WITH_PERPROCESS_VARIABLES - /* and SEG_ PERPROCESS, PERPROCESS_BSS */ - #endif WITH_PERPROCESS_VARIABLES } static segT --- 1811,1816 ---- *************** *** 1983,1995 **** expP -> X_add_number = 0; expP -> X_add_symbol = expP -> X_subtract_symbol = NULL; } - #ifdef WITH_PERPROCESS_VARIABLES - know( retval == SEG_ABSOLUTE || retval == SEG_DATA || retval == SEG_TEXT || - retval == SEG_BSS || retval == SEG_DIFFERENCE || retval == SEG_PERPROCESS || - retval == SEG_PERPROCESS_BSS;) - #else WITH_PERPROCESS_VARIABLES know( retval == SEG_ABSOLUTE || retval == SEG_DATA || retval == SEG_TEXT || retval == SEG_BSS || retval == SEG_DIFFERENCE ); - #endif WITH_PERPROCESS_VARIABLES return (retval); } /* get_known_segmented_expression() */ --- 1840,1846 ---- No differences encountered *** /xxV/cmds/gasnew/pgas/mi/subsegs.c Wed Sep 13 17:24:31 1989 --- /xxV/cmds/gasnew/dist/subsegs.c Tue Aug 8 13:46:09 1989 *************** *** 32,42 **** * frchain_now, /* Commented in "subsegs.h". */ * data0_frchainP; - #ifdef WITH_PERPROCESS_VARIABLES - frchainS* perprocess0_frchainP; - #endif WITH_PERPROCESS_VARIABLES - int /* in: segT out: N_TYPE bits */ seg_N_TYPE[] = { N_ABS, --- 32,38 ---- *************** *** 43,52 **** N_TEXT, N_DATA, N_BSS, - #ifdef WITH_PERPROCESS_VARIABLES - N_PERPROCESS, - N_PERPROCESS_BSS, - #endif WITH_PERPROCESS_VARIABLES N_UNDF, N_UNDF, N_UNDF, --- 39,44 ---- *************** *** 62,71 **** "text", "data", "bss", - #ifdef WITH_PERPROCESS_VARIABLES - "perprocess", - "perprocess_bss", - #endif WITH_PERPROCESS_VARIABLES "unknown", "absent", "pass1", --- 54,59 ---- *************** *** 86,102 **** SEG_DATA, /* N_DATA == 6 */ SEG_GOOF, SEG_BSS, /* N_BSS == 8 */ - #ifdef WITH_PERPROCESS_VARIABLES - SEG_GOOF, - SEG_GOOF, - SEG_GOOF, - SEG_PERPROCESS, /* N_PERPROCESS = 0xc, 12 */ - SEG_GOOF, - SEG_PERPROCESS_BSS, /* N_PERPROCESS_BSS = 0xe, 14 */ - SEG_GOOF, SEG_GOOF, - #else WITH_PERPROCESS_VARIABLES SEG_GOOF, SEG_GOOF, SEG_GOOF, SEG_GOOF, SEG_GOOF, SEG_GOOF, SEG_GOOF, SEG_GOOF, ! #endif WITH_PERPROCESS_VARIABLES SEG_GOOF, SEG_GOOF, SEG_GOOF, SEG_GOOF, SEG_GOOF, SEG_GOOF, SEG_GOOF }; --- 74,81 ---- SEG_DATA, /* N_DATA == 6 */ SEG_GOOF, SEG_BSS, /* N_BSS == 8 */ SEG_GOOF, SEG_GOOF, SEG_GOOF, SEG_GOOF, SEG_GOOF, SEG_GOOF, SEG_GOOF, SEG_GOOF, ! SEG_GOOF, SEG_GOOF, SEG_GOOF, SEG_GOOF, SEG_GOOF, SEG_GOOF, SEG_GOOF, SEG_GOOF, SEG_GOOF, SEG_GOOF, SEG_GOOF, SEG_GOOF, SEG_GOOF, SEG_GOOF, SEG_GOOF }; *************** *** 108,123 **** know( SEG_TEXT ==1 ); know( SEG_DATA ==2 ); know( SEG_BSS ==3 ); - #ifdef WITH_PERPROCESS_VARIABLES - know( SEG_PERPROCESS ==4 ); - know( SEG_PERPROCESS_BSS ==5 ); - know( SEG_UNKNOWN ==6 ); - know( SEG_NONE ==7 ); - know( SEG_PASS1 ==8 ); - know( SEG_GOOF ==9 ); - know( SEG_BIG ==10 ); - know( SEG_DIFFERENCE ==11 ); - #else WITH_PERPROCESS_VARIABLES know( SEG_UNKNOWN ==4 ); know( SEG_NONE ==5 ); know( SEG_PASS1 ==6 ); --- 87,92 ---- *************** *** 124,130 **** know( SEG_GOOF ==7 ); know( SEG_BIG ==8 ); know( SEG_DIFFERENCE ==9 ); - #endif WITH_PERPROCESS_VARIABLES know( SEG_MAXIMUM_ORDINAL == SEG_DIFFERENCE ); know( seg_name [(int) SEG_MAXIMUM_ORDINAL + 1] [0] == 0 ); --- 93,98 ---- *************** *** 139,148 **** /* This 1st frag will not be in any frchain. */ /* We simply give subseg_new somewhere to scribble. */ now_subseg = 42; /* Lie for 1st call to subseg_new. */ - #ifdef WITH_PERPROCESS_VARIABLES - subseg_new (SEG_PERPROCESS, 0);/* .perprocess 0 */ - perprocess0_frchainP = frchain_now; - #endif WITH_PERPROCESS_VARIABLES subseg_new (SEG_DATA, 0); /* .data 0 */ data0_frchainP = frchain_now; } --- 107,112 ---- *************** *** 164,192 **** { now_seg = seg; now_subseg = subseg; - - #ifdef WITH_PERPROCESS_VARIABLES - switch (seg) - { - - case SEG_DATA: - seg_fix_rootP = & data_fix_root; - break; - - case SEG_TEXT: - seg_fix_rootP = & text_fix_root; - break; - - case SEG_PERPROCESS: - seg_fix_rootP = & perprocess_fix_root; - break; - - default: - BAD_CASE(seg); - break; - - } - #else WITH_PERPROCESS_VARIABLES if (seg == SEG_DATA) { seg_fix_rootP = & data_fix_root; --- 128,133 ---- *************** *** 196,203 **** know (seg == SEG_TEXT); seg_fix_rootP = & text_fix_root; } - #endif WITH_PERPROCESS_VARIABLES - } /* --- 137,142 ---- *************** *** 219,236 **** void subseg_new (seg, subseg) /* begin assembly for a new sub-segment */ register segT seg; /* SEG_DATA or SEG_TEXT */ - #ifdef WITH_PERPROCESS_VARIABLES - /* or SEG_PERPROCESS */ - #endif WITH_PERPROCESS_VARIABLES register subsegT subseg; { long tmp; /* JF for obstack alignment hacking */ - #ifdef WITH_PERPROCESS_VARIABLES - know( seg == SEG_DATA || seg == SEG_TEXT || seg == SEG_PERPROCESS); - #else WITH_PERPROCESS_VARIABLES know( seg == SEG_DATA || seg == SEG_TEXT ); - #endif WITH_PERPROCESS_VARIABLES if (seg != now_seg || subseg != now_subseg) { /* we just changed sub-segments */ --- 158,168 ---- *************** *** 245,252 **** frag_now -> fr_fix = obstack_next_free(& frags) - frag_now -> fr_literal; frag_wane(frag_now); /* Close off any frag in old subseg. */ } - - /* * It would be nice to keep an obstack for each subsegment, if we swap * subsegments a lot. Hence we would have much fewer frag_wanes(). --- 177,182 ---- *************** *** 302,315 **** * May point to frchain_root. * */ - #ifdef WITH_PERPROCESS_VARIABLES - /* - ** Something has to be done about this code, since the commment - ** indicates that this logic only works for two segments, but no - ** I have added an additional segment. (I think) - */ - #endif WITH_PERPROCESS_VARIABLES - if ( ! frcP || ( (int)(frcP -> frch_seg) > (int)seg || frcP->frch_subseg > subseg)) /* Kinky logic only works with 2 segments. */ --- 232,237 ---- *** /xxV/cmds/gasnew/pgas/mi/subsegs.h Wed Sep 13 17:24:32 1989 --- /xxV/cmds/gasnew/dist/subsegs.h Tue Aug 8 13:46:12 1989 *************** *** 26,36 **** * code number). The chain runs through frch_next of each subsegment. * This makes it hard to find a subsegment's frags * if programmer uses a lot of them. Most programs only use text0 and - #ifdef WITH_PERPROCESS_VARIABLES - * data0 and perprocess0, so they don't suffer. At least this way: - #else * data0, so they don't suffer. At least this way: - #endif WITH_PERPROCESS_VARIABLES * (1) There are no "arbitrary" restrictions on how many subsegments * can be programmed; * (2) Subsegments' frchain-s are (later) chained together in the order in --- 26,32 ---- *************** *** 46,54 **** struct frag * frch_last; /* last struct frag in chain, or NULL */ struct frchain * frch_next; /* next in chain of struct frchain-s */ segT frch_seg; /* SEG_TEXT or SEG_DATA. */ - #ifdef WITH_PERPROCESS_VARIABLES - /* or SEG_PERPROCESS */ - #endif WITH_PERPROCESS_VARIABLES subsegT frch_subseg; /* subsegment number of this chain */ }; --- 42,47 ---- *************** *** 68,81 **** /* Points to the 1st data-segment frchain. */ /* (Which is pointed to by the last text- */ /* segment frchain.) */ - - #ifdef WITH_PERPROCESS_VARIABLES - extern frchainS * perprocess0_frchainP; - /* Sentinel for frchain crawling. */ - /* Points to the 1st perprocess-segment - frchain. */ - /* (Which is pointed to by the last data- */ - /* segment frchain.) */ - #endif WITH_PERPROCESS_VARIABLES /* end: subsegs.h */ --- 61,65 ---- *** /xxV/cmds/gasnew/pgas/mi/symbols.c Wed Sep 13 17:24:35 1989 --- /xxV/cmds/gasnew/dist/symbols.c Tue Aug 8 13:46:15 1989 *************** *** 35,43 **** /* Below are commented in "symbols.h". */ unsigned int local_bss_counter; - #ifdef WITH_PERPROCESS_VARIABLES - unsigned int local_perprocess_bss_counter; - #endif WITH_PERPROCESS_VARIABLES symbolS * symbol_rootP; symbolS * symbol_lastP; symbolS abs_symbol; --- 35,40 ---- *** /xxV/cmds/gasnew/pgas/mi/symbols.h Tue Sep 5 17:38:40 1989 --- /xxV/cmds/gasnew/dist/symbols.h Tue Aug 8 13:46:18 1989 *************** *** 24,38 **** extern unsigned int local_bss_counter; /* Zeroed before a pass. */ /* Only used by .lcomm directive. */ - #ifdef WITH_PERPROCESS_VARIABLES - /* - ** Is this really used? - ** Do I need an .lcomm equivalent for the perprocess segment? - ** What does .lcomm do, anyway? - */ - extern unsigned int local_perprocess_bss_counter; /* Zeroed before a pass. */ - #endif WITH_PERPROCESS_VARIABLES - extern symbolS * symbol_rootP; /* all the symbol nodes */ extern symbolS * symbol_lastP; /* last struct symbol we made, or NULL */ --- 24,29 ---- *** /xxV/cmds/gasnew/pgas/mi/write.c Wed Sep 13 17:24:41 1989 --- /xxV/cmds/gasnew/dist/write.c Tue Aug 8 13:46:52 1989 *************** *** 62,79 **** static struct frag * text_frag_root; static struct frag * data_frag_root; - #ifdef WITH_PERPROCESS_VARIABLES - static struct frag * perprocess_frag_root; - #endif WITH_PERPROCESS_VARIABLES - static struct frag * text_last_frag; /* Last frag in segment. */ static struct frag * data_last_frag; /* Last frag in segment. */ - #ifdef WITH_PERPROCESS_VARIABLES - static struct frag * perprocess_last_frag; /* Last frag in segment. */ - #endif WITH_PERPROCESS_VARIABLES - static struct exec the_exec; static long int string_byte_count; --- 62,71 ---- *************** *** 158,174 **** unsigned text_siz, data_siz, - #ifdef WITH_PERPROCESS_VARIABLES - perprocess_siz, - #endif WITH_PERPROCESS_VARIABLES syms_siz, tr_siz, - #ifdef WITH_PERPROCESS_VARIABLES - dr_siz, - pr_siz; - #else dr_siz; - #endif WITH_PERPROCESS_VARIABLES void output_file_create(); void output_file_append(); void output_file_close(); --- 150,158 ---- *************** *** 225,236 **** * Build one frag chain for each segment. Linked thru fr_next. * We know that there is at least 1 text frchain & at least 1 data frchain. */ - #ifdef WITH_PERPROCESS_VARIABLES - /* - * and at least one perprocess frchain. - */ - #endif WITH_PERPROCESS_VARIABLES - prev_fragPP = &text_frag_root; for ( frchainP=frchain_root; frchainP; frchainP=next_frchainP ) { --- 209,214 ---- *************** *** 237,311 **** know( frchainP -> frch_root ); * prev_fragPP = frchainP -> frch_root; prev_fragPP = & frchainP -> frch_last -> fr_next; - - #ifdef WITH_PERPROCESS_VARIABLES - - /* - ** This piece of code is confusing. - ** I'm extending this code to have three segments, not just two. - ** I don't think that data0_frchainP or perprocess0_frchainP - ** can be NULL, but these "knows" or asserts will let me know - ** if my assumption is wrong. - */ - - know ( data0_frchainP != NULL ); - - know ( perprocess0_frchainP != NULL ); - - know ( data0_frchainP != perprocess0_frchainP ); - - /* - ** Move to the next chain of code fragments. - */ - next_frchainP = frchainP->frch_next; - - /* - ** The case where the end of the text segment code fragment - ** chain is started and the data segment code fragment chain - ** begins. - */ - if (next_frchainP == data0_frchainP) - { - /* - ** What does this next statement really do? - */ - prev_fragPP = & data_frag_root; - - text_last_frag = frchainP -> frch_last; - } - - /* - ** The case where the end of the data segment code fragment - ** chain is started and the peprocess segment code fragment chain - ** begins. - */ - if (next_frchainP == perprocess0_frchainP) - { - /* - ** What does this next statement really do? - */ - prev_fragPP = & perprocess_frag_root; - - data_last_frag = frchainP -> frch_last; - } - - /* - ** This is the case where we have traveled down to the - ** end of all the code fragment chains. This is also - ** the end of the peprocess segment code fragment chain. - */ - if (next_frchainP == NULL) - { - /* - ** What does this next statement really do? - */ - prev_fragPP = NULL; - - - perprocess_last_frag = frchainP -> frch_last; - } - #else - if ( ((next_frchainP = frchainP->frch_next) == NULL) || next_frchainP == data0_frchainP) { --- 215,220 ---- *************** *** 319,325 **** data_last_frag = frchainP -> frch_last; } } - #endif WITH_PERPROCESS_VARIABLES } /* for(each struct frchain) */ /* --- 228,233 ---- *************** *** 346,355 **** relax_segment (text_frag_root, SEG_TEXT); relax_segment (data_frag_root, SEG_DATA); - #ifdef WITH_PERPROCESS_VARIABLES - relax_segment (perprocess_frag_root, SEG_PERPROCESS); - #endif WITH_PERPROCESS_VARIABLES - /* * Now the addresses of frags are correct within the segment. */ --- 254,259 ---- *************** *** 363,381 **** md_number_to_chars((char *)&the_exec.a_text,text_siz, sizeof(the_exec.a_text)); /* the_exec . a_text = text_last_frag -> fr_address; */ - #ifdef WITH_PERPROCESS_VARIABLES /* - * Join the 3 segments into 1 huge segment. - * To do this, re-compute every rn_address in the SEG_DATA and SEG_PERPROCESS - * frags. - * Then join the perprocess frags after the data frags - * and the data frags after the text frags. - * - * Determine a_data [length of data segment]. - * Determine a_perprocess_segment [length of perprocess segment]. - */ - #else WITH_PERPROCESS_VARIABLES - /* * Join the 2 segments into 1 huge segment. * To do this, re-compute every rn_address in the SEG_DATA frags. * Then join the data frags after the text frags. --- 267,273 ---- *************** *** 382,389 **** * * Determine a_data [length of data segment]. */ - #endif WITH_PERPROCESS_VARIABLES - if (data_frag_root) { register relax_addressT slide; --- 274,279 ---- *************** *** 401,412 **** fragP; fragP = fragP -> fr_next) { - #ifdef WITH_PERPROCESS_VARIABLES - if (fragP == perprocess_frag_root) - { - printf("OOPS, we shouldn't be here."); - } - #endif WITH_PERPROCESS_VARIABLES fragP -> fr_address += slide; } know( text_last_frag ); --- 291,296 ---- *************** *** 423,471 **** #endif md_number_to_chars((char *)&the_exec.a_bss,local_bss_counter,sizeof(the_exec.a_bss)); - #ifdef WITH_PERPROCESS_VARIABLES - - if (perprocess_frag_root) - { - register relax_addressT slide; - - know( data_last_frag -> fr_type == rs_fill && data_last_frag -> fr_offset == 0 ); - perprocess_siz=perprocess_last_frag->fr_address; - md_number_to_chars((char *)&the_exec.a_perprocess, perprocess_siz, sizeof(the_exec.a_perprocess)); - /* the_exec . a_perprocess = perprocess_last_frag -> fr_address; */ - - /* Address in file of the perprocess segment. */ - /* - ** Let's not do this and see how it turns out, maybe it will mess up - ** things. - slide = bss_address_frag.fr_address + local_bss_counter ; - - for (fragP = perprocess_frag_root; - fragP; - fragP = fragP -> fr_next) - { - fragP -> fr_address += slide; - } - */ - know( data_last_frag ); - data_last_frag -> fr_next = perprocess_frag_root; - } - else { - md_number_to_chars((char *)&the_exec.a_perprocess,0, - sizeof(the_exec.a_perprocess)); - perprocess_siz = 0; - } - - /* - ** Here's where I think that the bug is. The perprocess bss stuff is - ** just relative to the perpocess segment and nothing else. - */ - perprocess_bss_address_frag . fr_address = perprocess_siz; - - md_number_to_chars((char *)&the_exec.a_perprocess_bss, - local_perprocess_bss_counter, - sizeof(the_exec.a_perprocess_bss)); - #endif WITH_PERPROCESS_VARIABLES /* * --- 307,312 ---- *************** *** 698,719 **** = sizeof(struct relocation_info) * fixup_segment (text_fix_root, N_TEXT); the_exec . a_drsize = sizeof(struct relocation_info) * fixup_segment (data_fix_root, N_DATA); */ - #ifdef WITH_PERPROCESS_VARIABLES - /* the_exec . a_prsize - = sizeof(struct relocation_info) * - fixup_segment (perprocess_fix_root, PERPROCESS); */ - #endif WITH_PERPROCESS_VARIABLES tr_siz=sizeof(struct relocation_info) * fixup_segment (text_fix_root, N_TEXT); md_number_to_chars((char *)&the_exec.a_trsize, tr_siz ,sizeof(the_exec.a_trsize)); dr_siz=sizeof(struct relocation_info) * fixup_segment (data_fix_root, N_DATA); md_number_to_chars((char *)&the_exec.a_drsize, dr_siz, sizeof(the_exec.a_drsize)); - #ifdef WITH_PERPROCESS_VARIABLES - pr_siz=sizeof(struct relocation_info) * fixup_segment (perprocess_fix_root, N_PERPROCESS); - md_number_to_chars((char *)&the_exec.a_prsize, pr_siz, sizeof(the_exec.a_perprocess)); - #define a_magic a_info - #endif WITH_PERPROCESS_VARIABLES - #ifdef EXEC_MACHINE_TYPE md_number_to_chars((char *)&the_exec.a_machtype, EXEC_MACHINE_TYPE, sizeof(the_exec.a_machtype)); #endif --- 539,549 ---- *************** *** 726,740 **** sizeof( the_exec ) + text_siz + data_siz + - #ifdef WITH_PERPROCESS_VARIABLES - perprocess_siz + - #endif WITH_PERPROCESS_VARIABLES syms_siz + tr_siz + dr_siz + - #ifdef WITH_PERPROCESS_VARIABLES - pr_siz + - #endif WITH_PERPROCESS_VARIABLES string_byte_count; next_object_file_charP --- 556,564 ---- *************** *** 768,784 **** */ emit_relocations (text_fix_root, (relax_addressT)0); emit_relocations (data_fix_root, text_last_frag -> fr_address); - #ifdef WITH_PERPROCESS_VARIABLES - /* - ** Something that is special about the perprocess segment makes - ** passing 0 in work. I'm not sure what exactly, but this works so far - ** and maybe it's because the perprocess variable symbols are offset - ** from the beginning of the perprocess segment and not from the - ** beginning of the file. - */ - emit_relocations (perprocess_fix_root, (relax_addressT) 0); - #endif WITH_PERPROCESS_VARIABLES - /* * Emit all symbols left in the symbol chain. * Any symbol still undefined is made N_EXT. --- 592,597 ---- *************** *** 856,864 **** relax_segment (segment_frag_root, segment_type) struct frag * segment_frag_root; segT segment_type; /* N_DATA or N_TEXT */ - #ifdef WITH_PERPROCESS_VARIABLES - /* or N_PERPROCESS */ - #endif WITH_PERPROCESS_VARIABLES { register struct frag * fragP; register relax_addressT address; --- 669,674 ---- *************** *** 865,879 **** /* register relax_addressT old_address; JF unused */ /* register relax_addressT new_address; JF unused */ - #ifdef WITH_PERPROCESS_VARIABLES - know( segment_type == SEG_DATA || segment_type == SEG_TEXT || - segment_type == SEG_PERPROCESS ); - #else WITH_PERPROCESS_VARIABLES know( segment_type == SEG_DATA || segment_type == SEG_TEXT ); - #endif WITH_PERPROCESS_VARIABLES - - /* In case md_estimate_size_before_relax() wants to make fixSs. */ subseg_change (segment_type, 0); --- 675,682 ---- *************** *** 1010,1024 **** target = offset; if (symbolP) { - #ifdef WITH_PERPROCESS_VARIABLES - know( ((symbolP -> sy_type & N_TYPE) == N_ABS) || - ((symbolP -> sy_type & N_TYPE) == N_DATA) || - ((symbolP -> sy_type & N_TYPE) == N_TEXT) || - ((symbolP -> sy_type & N_TYPE) == N_PERPROCESS)); - #else WITH_PERPROCESS_VARIABLES know( ((symbolP -> sy_type & N_TYPE) == N_ABS) || ((symbolP -> sy_type & N_TYPE) == N_DATA) || ((symbolP -> sy_type & N_TYPE) == N_TEXT)); - #endif WITH_PERPROCESS_VARIABLES - know( symbolP -> sy_frag ); know( (symbolP->sy_type&N_TYPE)!=N_ABS || symbolP->sy_frag==&zero_address_frag ); target += --- 813,819 ---- *************** *** 1048,1062 **** know( ((symbolP -> sy_type & N_TYPE) == N_ABS) || ((symbolP -> sy_type & N_TYPE) == N_DATA) || ((symbolP -> sy_type & N_TYPE) == N_TEXT)); know( symbolP -> sy_frag ); ! #ifdef WITH_PERPROCESS_VARIABLES ! know( ((symbolP -> sy_type & N_TYPE) == N_ABS) || ! ((symbolP -> sy_type & N_TYPE) == N_DATA) || ! ((symbolP -> sy_type & N_TYPE) == N_TEXT) || ! ((symbolP -> sy_type & N_TYPE) == N_PERPROCESS) ); ! #else WITH_PERPROCESS_VARIABLES ! know( (symbolP->sy_type&N_TYPE)!=N_ABS || symbolP->sy_frag==&zero_address_frag ); ! #endif WITH_PERPROCESS_VARIABLES ! target += symbolP -> sy_value + symbolP -> sy_frag -> fr_address; --- 843,849 ---- know( ((symbolP -> sy_type & N_TYPE) == N_ABS) || ((symbolP -> sy_type & N_TYPE) == N_DATA) || ((symbolP -> sy_type & N_TYPE) == N_TEXT)); know( symbolP -> sy_frag ); ! know( (symbolP->sy_type&N_TYPE)!=N_ABS || symbolP->sy_frag==&zero_address_frag ); target += symbolP -> sy_value + symbolP -> sy_frag -> fr_address; *************** *** 1202,1211 **** else if ( ((sub_symbolP -> sy_type ^ add_symbol_N_TYPE) & N_TYPE) == 0 && ( add_symbol_N_TYPE == N_DATA || add_symbol_N_TYPE == N_TEXT - #ifdef WITH_PERPROCESS_VARIABLES - || add_symbol_N_TYPE == N_PERPROCESS - || add_symbol_N_TYPE == N_PERPROCESS_BSS - #endif WITH_PERPROCESS_VARIABLES || add_symbol_N_TYPE == N_BSS || add_symbol_N_TYPE == N_ABS)) { --- 989,994 ---- *************** *** 1264,1279 **** case N_BSS: case N_DATA: case N_TEXT: - #ifdef WITH_PERPROCESS_VARIABLES - /* - ** There must be cases here to handle N_PERPROCESS and - ** N_PERPROCESS_BSS, but I am not sure if these are the - ** correct steps to take since relocating a peprocess symbol - ** is different than relocating other symbols. - */ - case N_PERPROCESS_BSS: - case N_PERPROCESS: - #endif WITH_PERPROCESS_VARIABLES seg_reloc_count ++; add_number += add_symbolP -> sy_value; break; --- 1047,1052 ---- *** /xxV/cmds/gasnew/pgas/mi/write.h Wed Sep 13 17:24:43 1989 --- /xxV/cmds/gasnew/dist/write.h Tue Aug 8 13:46:55 1989 *************** *** 70,78 **** COMMON fixS * text_fix_root; /* Chains fixSs. */ COMMON fixS * data_fix_root; /* Chains fixSs. */ - #ifdef WITH_PERPROCESS_VARIABLES - COMMON fixS * perprocess_fix_root; /* Chains fixSs. */ - #endif WITH_PERPROCESS_VARIABLES COMMON fixS ** seg_fix_rootP; /* -> one of above. */ bit_fixS *bit_fix_new(); --- 70,75 ---- *** /xxV/cmds/gasnew/pgas/pgasvax/mi/vax.c Wed Sep 6 16:36:44 1989 --- /xxV/cmds/gasnew/dist/vax.c Tue Aug 8 13:46:37 1989 *************** *** 463,472 **** case SEG_TEXT: case SEG_DATA: case SEG_BSS: - #ifdef WITH_PERPROCESS_VARIABLES - case SEG_PERPROCESS: - case SEG_PERPROCESS_BSS: - #endif WITH_PERPROCESS_VARIABLES case SEG_ABSOLUTE: case SEG_UNKNOWN: break; --- 463,468 ---- *************** *** 710,736 **** this_subtract_symbol = expP -> X_subtract_symbol; to_seg = expP -> X_seg; is_undefined = (to_seg == SEG_UNKNOWN); - #ifdef WITH_PERPROCESS_VARIABLES know( to_seg == SEG_UNKNOWN \ || to_seg == SEG_ABSOLUTE \ || to_seg == SEG_DATA \ || to_seg == SEG_TEXT \ || to_seg == SEG_BSS \ - || to_seg == SEG_PERPROCESS \ - || to_seg == SEG_PERPROCESS_BSS \ || to_seg == SEG_BIG \ ); - #else WITH_PERPROCESS_VARIABLES - know( to_seg == SEG_UNKNOWN \ - || to_seg == SEG_ABSOLUTE \ - || to_seg == SEG_DATA \ - || to_seg == SEG_TEXT \ - || to_seg == SEG_BSS \ - || to_seg == SEG_PERPROCESS \ - || to_seg == SEG_PERPROCESS_BSS \ - || to_seg == SEG_BIG \ - ); - #endif WITH_PERPROCESS_VARIABLES at = operandP -> vop_mode & 1; length = operandP->vop_short=='b' ? 1 : operandP->vop_short=='w' ? 2 : operandP->vop_short=='l' ? 4 : 0; nbytes = operandP -> vop_nbytes; --- 706,718 ---- -- Peter Ham PO Box 3430 (h)(415) 324-9645 MS Computer Science Student Stanford, CA ham@polya.stanford.edu Stanford University 94309 (o)(415) 723-2067