diff --git a/gas/ChangeLog b/gas/ChangeLog index 6b401dfebd..2b893d4a17 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,16 @@ +2000-09-13 Kazu Hirata + + * config/obj-ecoff.c: Fix formatting. + * config/obj-elf.c: Likewise. + * config/obj-elf.h: Likewise. + * config/obj-evax.h: Likewise. + * config/obj-generic.h: Likewise. + * config/obj-hp300.c: Likewise. + * config/obj-hp300.h: Likewise. + * config/obj-ieee.h: Likewise. + * config/obj-vms.c: Likewise. + * config/obj-vms.h: Likewise. + 2000-09-13 Anders Norlander * config/tc-mips.c (md_begin): Recognize 4Kc, 4Km and 4Kp processors. diff --git a/gas/config/obj-ecoff.c b/gas/config/obj-ecoff.c index 7279445845..42eaf59fb7 100644 --- a/gas/config/obj-ecoff.c +++ b/gas/config/obj-ecoff.c @@ -85,7 +85,7 @@ const pseudo_typeS obj_pseudo_table[] = { "extern", ecoff_directive_extern, 0 }, #ifndef TC_MIPS - /* For TC_MIPS, tc-mips.c adds this. */ + /* For TC_MIPS, tc-mips.c adds this. */ { "weakext", ecoff_directive_weakext, 0 }, #endif diff --git a/gas/config/obj-elf.c b/gas/config/obj-elf.c index 453a3950a6..4e7f3a36d0 100644 --- a/gas/config/obj-elf.c +++ b/gas/config/obj-elf.c @@ -17,7 +17,7 @@ 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, 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. */ + 02111-1307, USA. */ #define OBJ_HEADER "obj-elf.h" #include "as.h" @@ -96,7 +96,7 @@ static const pseudo_typeS elf_pseudo_table[] = {"version", obj_elf_version, 0}, {"weak", obj_elf_weak, 0}, - /* These define symbol visibility. */ + /* These define symbol visibility. */ {"internal", obj_elf_visibility, STV_INTERNAL}, {"hidden", obj_elf_visibility, STV_HIDDEN}, {"protected", obj_elf_visibility, STV_PROTECTED}, @@ -114,7 +114,7 @@ static const pseudo_typeS elf_pseudo_table[] = {"vtable_inherit", (void (*) PARAMS ((int))) &obj_elf_vtable_inherit, 0}, {"vtable_entry", (void (*) PARAMS ((int))) &obj_elf_vtable_entry, 0}, - /* These are used for dwarf. */ + /* These are used for dwarf. */ {"2byte", cons, 2}, {"4byte", cons, 4}, {"8byte", cons, 8}, @@ -542,7 +542,6 @@ obj_elf_visibility (visibility) demand_empty_rest_of_line (); } - static segT previous_section; static int previous_subsection; @@ -555,7 +554,6 @@ struct section_stack static struct section_stack *section_stack; - /* Handle the .section pseudo-op. This code supports two different syntaxes. @@ -1083,7 +1081,7 @@ obj_elf_line (ignore) int ignore ATTRIBUTE_UNUSED; { /* Assume delimiter is part of expression. BSD4.2 as fails with - delightful bug, so we are not being incompatible here. */ + delightful bug, so we are not being incompatible here. */ new_logical_line ((char *) NULL, (int) (get_absolute_expression ())); demand_empty_rest_of_line (); } @@ -1306,7 +1304,7 @@ obj_elf_version (ignore) SKIP_WHITESPACE (); if (*input_line_pointer == '\"') { - ++input_line_pointer; /* -> 1st char of string. */ + ++input_line_pointer; /* -> 1st char of string. */ name = input_line_pointer; while (is_a_char (c = next_char_of_string ())) @@ -1512,9 +1510,9 @@ obj_elf_init_stab_section (seg) UnixWare ar crashes. */ bfd_set_section_alignment (stdoutput, seg, 2); - /* Make space for this first symbol. */ + /* Make space for this first symbol. */ p = frag_more (12); - /* Zero it out. */ + /* Zero it out. */ memset (p, 0, 12); as_where (&file, (unsigned int *) NULL); stabstr_name = (char *) alloca (strlen (segment_name (seg)) + 4); @@ -1682,7 +1680,7 @@ elf_frob_symbol (symp, puntp) final loop over the symbol table. We can get away with it only because the symbol goes to the end of the list, where the loop will still see it. It would probably be - better to do this in obj_frob_file_before_adjust. */ + better to do this in obj_frob_file_before_adjust. */ symp2 = symbol_find_or_make (sy_obj->versioned_name); diff --git a/gas/config/obj-elf.h b/gas/config/obj-elf.h index 77fec78b82..70ee61af07 100644 --- a/gas/config/obj-elf.h +++ b/gas/config/obj-elf.h @@ -19,7 +19,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - /* HP PA-RISC support was contributed by the Center for Software Science at the University of Utah. */ @@ -229,7 +228,7 @@ extern void obj_elf_init_stab_section PARAMS ((segT)); ecoff_stab ((seg), (what), (string), (type), (other), (desc)) #endif /* ECOFF_DEBUGGING */ -#endif /* SEPARATE_STAB_SECTIONS not defined. */ +#endif /* SEPARATE_STAB_SECTIONS not defined. */ extern void elf_frob_symbol PARAMS ((symbolS *, int *)); #ifndef obj_frob_symbol diff --git a/gas/config/obj-evax.h b/gas/config/obj-evax.h index 745b1feff9..351003c759 100644 --- a/gas/config/obj-evax.h +++ b/gas/config/obj-evax.h @@ -25,10 +25,10 @@ * object format specific header files. */ -/* define an obj specific macro off which target cpu back ends may key. */ +/* define an obj specific macro off which target cpu back ends may key. */ #define OBJ_EVAX 1 -/* include whatever target cpu is appropriate. */ +/* include whatever target cpu is appropriate. */ #include "targ-cpu.h" #ifdef BFD_ASSEMBLER @@ -60,7 +60,7 @@ typedef void *object_headers; #define DEFAULT_MAGIC_NUMBER_FOR_OBJECT_FILE (0) /* your magic number */ -#define OBJ_EMIT_LINENO(a,b,c) /* must be *something*. This no-op's it out. */ +#define OBJ_EMIT_LINENO(a,b,c) /* must be *something*. This no-op's it out. */ #define obj_symbol_new_hook(s) {;} @@ -93,5 +93,3 @@ typedef void *object_headers; * fill-column: 131 * End: */ - -/* end of obj-evax.h */ diff --git a/gas/config/obj-generic.h b/gas/config/obj-generic.h index dc18e43970..00e46382f5 100644 --- a/gas/config/obj-generic.h +++ b/gas/config/obj-generic.h @@ -1,5 +1,5 @@ /* This file is obj-generic.h - Copyright (C) 1987-1992 Free Software Foundation, Inc. + Copyright (C) 1987-1992, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -14,18 +14,19 @@ 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + along with GAS; see the file COPYING. If not, write to the Free + Software Foundation, 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ /* * This file is obj-generic.h and is intended to be a template for * object format specific header files. */ -/* define an obj specific macro off which target cpu back ends may key. */ +/* define an obj specific macro off which target cpu back ends may key. */ #define OBJ_GENERIC 1 -/* include whatever target cpu is appropriate. */ +/* include whatever target cpu is appropriate. */ #include "targ-cpu.h" /* @@ -65,10 +66,9 @@ typedef void *object_headers; /* symbols may or may not be defined */ #define S_IS_DEFINED(s) (0) - #define DEFAULT_MAGIC_NUMBER_FOR_OBJECT_FILE (0) /* your magic number */ -#define OBJ_EMIT_LINENO(a,b,c) /* must be *something*. This no-op's it out. */ +#define OBJ_EMIT_LINENO(a,b,c) /* must be *something*. This no-op's it out. */ /* * Local Variables: @@ -76,5 +76,3 @@ typedef void *object_headers; * fill-column: 131 * End: */ - -/* end of obj-generic.h */ diff --git a/gas/config/obj-hp300.c b/gas/config/obj-hp300.c index 6e9cc53927..22a4032068 100644 --- a/gas/config/obj-hp300.c +++ b/gas/config/obj-hp300.c @@ -1,5 +1,5 @@ /* This file is obj-hp300.h - Copyright (C) 1993 Free Software Foundation, Inc. + Copyright (C) 1993, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -14,8 +14,9 @@ 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + along with GAS; see the file COPYING. If not, write to the Free + Software Foundation, 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ #include "config/obj-aout.c" @@ -36,17 +37,17 @@ hp300_header_append (where, headers) DO (a_info); DO (a_spare1); DO (a_spare2); - DO (a_text); - DO (a_data); - DO (a_bss); - DO (a_trsize); + DO (a_text); + DO (a_data); + DO (a_bss); + DO (a_trsize); DO (a_drsize); DO (a_spare3); DO (a_spare4); DO (a_spare5); - DO (a_entry); + DO (a_entry); DO (a_spare6); DO (a_spare7); - DO (a_syms); + DO (a_syms); DO (a_spare8); } diff --git a/gas/config/obj-hp300.h b/gas/config/obj-hp300.h index ff4006b604..88733d8c6f 100644 --- a/gas/config/obj-hp300.h +++ b/gas/config/obj-hp300.h @@ -1,5 +1,5 @@ /* This file is obj-hp300.h - Copyright (C) 1993 Free Software Foundation, Inc. + Copyright (C) 1993, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -14,8 +14,9 @@ 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + along with GAS; see the file COPYING. If not, write to the Free + Software Foundation, 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ #define __STRUCT_EXEC_OVERRIDE__ @@ -47,18 +48,18 @@ struct exec unsigned long a_info; unsigned long a_spare1; unsigned long a_spare2; - unsigned long a_text; - unsigned long a_data; - unsigned long a_bss; - unsigned long a_trsize; + unsigned long a_text; + unsigned long a_data; + unsigned long a_bss; + unsigned long a_trsize; unsigned long a_drsize; unsigned long a_spare3; unsigned long a_spare4; unsigned long a_spare5; - unsigned long a_entry; + unsigned long a_entry; unsigned long a_spare6; unsigned long a_spare7; - unsigned long a_syms; + unsigned long a_syms; unsigned long a_spare8; }; @@ -66,6 +67,6 @@ struct exec #define AOUT_VERSION 0x02 #define AOUT_MACHTYPE 0x0c #define OMAGIC 0x106 - + #define obj_header_append hp300_header_append #include "config/obj-aout.h" diff --git a/gas/config/obj-ieee.h b/gas/config/obj-ieee.h index 4198af8e62..fbef1cd257 100644 --- a/gas/config/obj-ieee.h +++ b/gas/config/obj-ieee.h @@ -1,6 +1,5 @@ /* This file is obj-ieee.h - - Copyright (C) 1987-1992 Free Software Foundation, Inc. + Copyright (C) 1987-1992, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -15,8 +14,9 @@ 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + along with GAS; see the file COPYING. If not, write to the Free + Software Foundation, 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ #define BFD 1 @@ -41,10 +41,6 @@ object_headers; #define DEFAULT_MAGIC_NUMBER_FOR_OBJECT_FILE 1 - int lineno_rootP; - #define IEEE_STYLE - -/* end of obj-ieee.h */ diff --git a/gas/config/obj-vms.c b/gas/config/obj-vms.c index 20021367ec..4389ea9258 100644 --- a/gas/config/obj-vms.c +++ b/gas/config/obj-vms.c @@ -1,5 +1,6 @@ /* vms.c -- Write out a VAX/VMS object file - Copyright (C) 1987, 88, 92, 94, 95, 97, 1998 Free Software Foundation, Inc. + Copyright (C) 1987, 88, 92, 94, 95, 97, 98, 2000 + Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -30,10 +31,10 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "subsegs.h" #include "obstack.h" -/* What we do if there is a goof. */ +/* What we do if there is a goof. */ #define error as_fatal -#ifdef VMS /* These are of no use if we are cross assembling. */ +#ifdef VMS /* These are of no use if we are cross assembling. */ #include /* Define File Access Block */ #include /* Define NAM Block */ #include /* Define XAB - all different types*/ @@ -102,7 +103,6 @@ struct input_file static struct input_file *file_root = (struct input_file *) NULL; - /* * Styles of PSECTS (program sections) that we generate; just shorthand * to avoid lists of section attributes. Used by VMS_Psect_Spec(). @@ -253,10 +253,9 @@ static int total_len; /* used to calculate the total length of variable descriptor plus array descriptor - used for len byte*/ /* Flag if we have told user about finding global constants in the text - section. */ + section. */ static int gave_compiler_message = 0; - /* * Global data (Object records limited to 512 bytes by VAX-11 "C" runtime) */ @@ -447,7 +446,6 @@ const pseudo_typeS obj_pseudo_table[] = {0, 0, 0}, }; /* obj_pseudo_table */ - /* Routine to perform RESOLVE_SYMBOL_REDEFINITION(). */ int @@ -484,7 +482,6 @@ vms_resolve_symbol_redef (sym) return 0; } - /* `tc_frob_label' handler for colon(symbols.c), used to examine the dummy label(s) gcc inserts at the beginning of each file it generates. gcc 1.x put "gcc_compiled."; gcc 2.x (as of 2.7) puts "gcc2_compiled." @@ -518,14 +515,12 @@ symbolS *symbolP; return; } - void obj_read_begin_hook () { return; } - void obj_crawl_symbol_chain (headers) object_headers *headers; @@ -534,7 +529,7 @@ obj_crawl_symbol_chain (headers) symbolS **symbolPP; int symbol_number = 0; - symbolPP = &symbol_rootP; /* -> last symbol chain link. */ + symbolPP = &symbol_rootP; /* -> last symbol chain link. */ while ((symbolP = *symbolPP) != NULL) { resolve_symbol_value (symbolP, 1); @@ -564,7 +559,7 @@ obj_crawl_symbol_chain (headers) if (S_IS_EXTERNAL (symbolP) || !S_IS_DEFINED (symbolP)) { as_bad (_("Local symbol %s never defined"), S_GET_NAME (symbolP)); - } /* oops. */ + } /* oops. */ /* Unhook it from the chain. */ *symbolPP = symbol_next (symbolP); @@ -579,7 +574,6 @@ obj_crawl_symbol_chain (headers) /****** VMS OBJECT FILE HACKING ROUTINES *******/ - /* Create the VMS object file. */ static void @@ -600,7 +594,6 @@ Create_VMS_Object_File () Current_Object_Record_Type = -1; } - /* Flush the object record buffer to the object file. */ static void @@ -610,7 +603,7 @@ Flush_VMS_Object_Record_Buffer () if (Object_Record_Offset == 0) return; -#ifndef VMS /* For cross-assembly purposes. */ +#ifndef VMS /* For cross-assembly purposes. */ { char RecLen[2]; @@ -640,7 +633,6 @@ Flush_VMS_Object_Record_Buffer () Object_Record_Offset = 0; } - /* Declare a particular type of object file record. */ static void @@ -656,7 +648,6 @@ Set_VMS_Object_File_Record (Type) Current_Object_Record_Type = Type; } - /* Close the VMS Object file. */ static void @@ -665,7 +656,7 @@ Close_VMS_Object_File () /* Flush (should never be necessary) and reset saved record-type context. */ Set_VMS_Object_File_Record (-1); -#ifndef VMS /* For cross-assembly purposes. */ +#ifndef VMS /* For cross-assembly purposes. */ { char RecLen[2]; int minus_one = -1; @@ -689,7 +680,6 @@ Close_VMS_Object_File () /****** Text Information and Relocation routines ******/ - /* Stack Psect base followed by signed, varying-sized offset. Common to several object records. */ @@ -736,7 +726,6 @@ vms_tir_stack_psect (Psect_Index, Offset, Force) #undef Sta_P } - /* Store immediate data in current Psect. */ static void @@ -773,7 +762,6 @@ VMS_Store_Immediate_Data (Pointer, Size, Record_Type) Flush_VMS_Object_Record_Buffer (); } - /* Make a data reference. */ static void @@ -796,7 +784,6 @@ VMS_Set_Data (Psect_Index, Offset, Record_Type, Force) Flush_VMS_Object_Record_Buffer (); } - /* Make a debugger reference to a struct, union or enum. */ static void @@ -817,7 +804,6 @@ VMS_Store_Struct (Struct_Index) Flush_VMS_Object_Record_Buffer (); } - /* Make a debugger reference to partially define a struct, union or enum. */ static void @@ -854,7 +840,6 @@ VMS_Set_Struct (Struct_Index) /****** Traceback Information routines ******/ - /* Write the Traceback Module Begin record. */ static void @@ -888,7 +873,6 @@ VMS_TBT_Module_Begin () VMS_Store_Immediate_Data (Local, Size, OBJ_S_C_TBT); } - /* Write the Traceback Module End record. */ static void @@ -903,7 +887,6 @@ VMS_TBT_Module_End () VMS_Store_Immediate_Data (Local, 2, OBJ_S_C_TBT); } - /* Write a Traceback Routine Begin record. */ static void @@ -949,7 +932,6 @@ VMS_TBT_Routine_Begin (symbolP, Psect) VMS_Store_Immediate_Data (Local, Size, OBJ_S_C_TBT); } - /* Write a Traceback Routine End record. We *must* search the symbol table to find the next routine, since the @@ -1006,7 +988,6 @@ VMS_TBT_Routine_End (Max_Size, sp) VMS_Store_Immediate_Data (Local, 7, OBJ_S_C_TBT); } - /* Write a Traceback Block Begin record. */ static void @@ -1050,7 +1031,6 @@ VMS_TBT_Block_Begin (symbolP, Psect, Name) VMS_Store_Immediate_Data (Local, Size, OBJ_S_C_DBG); } - /* Write a Traceback Block End record. */ static void @@ -1281,13 +1261,12 @@ VMS_TBT_Source_File (Filename, ID_Number) /* Library module name (none). */ *cp++ = 0; /* Now that size is known, fill it in and write out the record. */ - Local[4] = cp - &Local[5]; /* source file declaration size */ + Local[4] = cp - &Local[5]; /* source file declaration size */ Local[0] = cp - &Local[1]; /* TBT record size */ VMS_Store_Immediate_Data (Local, cp - Local, OBJ_S_C_TBT); return 1; } - /* Traceback information is described in terms of lines from compiler listing files, not lines from source files. We need to set up the correlation between listing line numbers and source line numbers. @@ -1302,7 +1281,7 @@ VMS_TBT_Source_Lines (ID_Number, Starting_Line_Number, Number_Of_Lines) { char *cp; int chunk_limit; - char Local[128]; /* room enough to describe 1310700 lines... */ + char Local[128]; /* room enough to describe 1310700 lines... */ cp = &Local[1]; /* Put size in Local[0] later. */ *cp++ = DST_S_C_SOURCE; /* DST type is "source file". */ @@ -1347,7 +1326,6 @@ VMS_TBT_Source_Lines (ID_Number, Starting_Line_Number, Number_Of_Lines) /****** Debugger Information support routines ******/ - /* This routine locates a file in the list of files. If an entry does not exist, one is created. For include files, a new entry is always created such that inline functions can be properly debugged. */ @@ -1394,7 +1372,6 @@ find_file (sp) return fpnt; } - /* This routine converts a number string into an integer, and stops when it sees an invalid character. The return value is the address of the character just past the last character read. No error is generated. */ @@ -1426,7 +1403,6 @@ cvt_integer (str, rtn) * sections have already been output. */ - /* This routine fixes the names that are generated by C++, ".this" is a good example. The period does not work for the debugger, since it looks like the syntax for a structure element, and thus it gets mightily confused. @@ -1468,7 +1444,6 @@ fix_name (pnt) return pnt; } - /* When defining a structure, this routine is called to find the name of the actual structure. It is assumed that str points to the equal sign in the definition, and it moves backward until it finds the start of the @@ -1497,7 +1472,6 @@ get_struct_name (str) return pnt; } - /* Search symbol list for type number dbx_type. Return a pointer to struct. */ @@ -1519,7 +1493,6 @@ find_symbol (dbx_type) return find_symbol (spnt->type2); } - #if 0 /* obsolete */ /* this routine puts info into either Local or Asuffix, depending on the sign * of size. The reason is that it is easier to build the variable descriptor @@ -1556,7 +1529,6 @@ push (value, size1) } #endif - static void fpush (value, size) int value, size; @@ -1595,7 +1567,6 @@ rpush (value, size) } } - /* This routine generates the array descriptor for a given array. */ static void @@ -1652,7 +1623,6 @@ array_suffix (spnt2) } } - /* This routine generates the start of a variable descriptor based upon a struct/union/enum that has yet to be defined. We define this spot as a new location, and save four bytes for the address. When the struct is @@ -1675,7 +1645,6 @@ new_forward_ref (dbx_type) struct_number = -fpnt->struc_numb; } - /* This routine generates the variable descriptor used to describe non-basic variables. It calls itself recursively until it gets to the bottom of it all, and then builds the descriptor backwards. It is easiest to do it @@ -1780,7 +1749,6 @@ gen1 (spnt, array_suffix_len) return 0; } - /* This generates a suffix for a variable. If it is not a defined type yet, then dbx_type contains the type we are expecting so we can generate a forward reference. This calls gen1 to build most of the descriptor, and @@ -1860,7 +1828,6 @@ generate_suffix (spnt, dbx_type) Lpnt = 0; } - /* "novel length" type doesn't work for simple atomic types */ #define USE_BITSTRING_DESCRIPTOR(t) ((t)->advanced == BASIC) #undef SETUP_BASIC_TYPES @@ -1887,7 +1854,6 @@ bitfield_suffix (spnt, width) VMS_Store_Struct (spnt->struc_numb); /* output 4 more bytes */ } - /* Formally define a builtin type, so that it can serve as the target of an indirect reference. It makes bitfield_suffix() easier by avoiding the need to use a forward reference for the first occurrence of each @@ -1942,7 +1908,6 @@ setup_basic_type (spnt) return; } - /* This routine generates a symbol definition for a C symbol for the debugger. It takes a psect and offset for global symbols; if psect < 0, then this is a local variable and the offset is relative to FP. In this case it can @@ -1988,7 +1953,6 @@ VMS_DBG_record (spnt, Psect, Offset, Name) generate_suffix (spnt, 0); } - /* This routine parses the stabs entries in order to make the definition for the debugger of local symbols and function parameters. */ @@ -2062,7 +2026,6 @@ VMS_local_stab_Parse (sp) return; } - /* This routine parses a stabs entry to find the information required to define a variable. It is used for global and static variables. Basically we need to know the address of the symbol. With older @@ -2170,7 +2133,6 @@ VMS_stab_parse (sp, expected_type, type1, type2, Text_Psect) return; } - /* Simpler interfaces into VMS_stab_parse(). */ static void @@ -2197,7 +2159,6 @@ VMS_STSYM_Parse (sp, Text_Psect) VMS_stab_parse (sp, 'S', N_DATA, -1, Text_Psect); } - /* For register symbols, we must figure out what range of addresses within the psect are valid. We will use the brackets in the stab directives to give us guidance as to the PC range that this variable @@ -2319,7 +2280,6 @@ VMS_RSYM_Parse (sp, Current_Routine, Text_Psect) generate_suffix (spnt, 0); } - /* This function examines a structure definition, checking all of the elements to make sure that all of them are fully defined. The only thing that we kick out are arrays of undefined structs, since we do not know how big @@ -2353,7 +2313,6 @@ forward_reference (pnt) return 0; /* no forward refences found */ } - /* Used to check a single element of a structure on the final pass. */ static int @@ -2372,7 +2331,6 @@ final_forward_reference (spnt) return 0; /* no forward refences found */ } - /* This routine parses the stabs directives to find any definitions of dbx type numbers. It makes a note of all of them, creating a structure element of VMS_DBG_Symbol that describes it. This also generates the @@ -2802,7 +2760,6 @@ VMS_typedef_parse (str) return 0; } - /* This is the root routine that parses the stabs entries for definitions. it calls VMS_typedef_parse, which can in turn call itself. We need to be careful, since sometimes there are forward references to other symbol @@ -2947,7 +2904,6 @@ VMS_LSYM_Parse () } } - static void Define_Local_Symbols (s0P, s2P, Current_Routine, Text_Psect) symbolS *s0P, *s2P; @@ -2987,7 +2943,6 @@ Define_Local_Symbols (s0P, s2P, Current_Routine, Text_Psect) } /* for */ } - /* This function crawls the symbol chain searching for local symbols that need to be described to the debugger. When we enter a new scope with a "{", it creates a new "block", which helps the debugger keep track @@ -3072,7 +3027,6 @@ get_VMS_time_on_unix (Now) } #endif /* not VMS */ - /* Write the MHD (Module Header) records. */ static void @@ -3179,7 +3133,6 @@ Write_VMS_MHD_Records () Flush_VMS_Object_Record_Buffer (); } - /* Write the EOM (End Of Module) record. */ static void @@ -3195,7 +3148,7 @@ Write_VMS_EOM_Record (Psect, Offset) */ Set_VMS_Object_File_Record (OBJ_S_C_EOM); PUT_CHAR (OBJ_S_C_EOM); /* Record type. */ - PUT_CHAR (0); /* Error severity level (we ignore it). */ + PUT_CHAR (0); /* Error severity level (we ignore it). */ /* * Store the entry point, if it exists */ @@ -3417,7 +3370,6 @@ VMS_Case_Hack_Symbol (In, Out) #define GLOBALSYMBOL_BIT 0x10000 #define GLOBALVALUE_BIT 0x20000 - static void VMS_Modify_Psect_Attributes (Name, Attribute_Pointer) const char *Name; @@ -3525,7 +3477,7 @@ VMS_Modify_Psect_Attributes (Name, Attribute_Pointer) #define GBLSYM_REF 0 #define GBLSYM_DEF 1 #define GBLSYM_VAL 2 -#define GBLSYM_LCL 4 /* not GBL after all... */ +#define GBLSYM_LCL 4 /* not GBL after all... */ #define GBLSYM_WEAK 8 /* @@ -3663,30 +3615,30 @@ VMS_Psect_Spec (Name, Size, Type, vsp) switch (Type) { case ps_TEXT: - /* Text psects are PIC,noOVR,REL,noGBL,SHR,EXE,RD,noWRT. */ + /* Text psects are PIC,noOVR,REL,noGBL,SHR,EXE,RD,noWRT. */ Psect_Attributes = (GPS_S_M_PIC|GPS_S_M_REL|GPS_S_M_SHR|GPS_S_M_EXE |GPS_S_M_RD); break; case ps_DATA: - /* Data psects are PIC,noOVR,REL,noGBL,noSHR,noEXE,RD,WRT. */ + /* Data psects are PIC,noOVR,REL,noGBL,noSHR,noEXE,RD,WRT. */ Psect_Attributes = (GPS_S_M_PIC|GPS_S_M_REL|GPS_S_M_RD|GPS_S_M_WRT); break; case ps_COMMON: - /* Common block psects are: PIC,OVR,REL,GBL,noSHR,noEXE,RD,WRT. */ + /* Common block psects are: PIC,OVR,REL,GBL,noSHR,noEXE,RD,WRT. */ Psect_Attributes = (GPS_S_M_PIC|GPS_S_M_OVR|GPS_S_M_REL|GPS_S_M_GBL |GPS_S_M_RD|GPS_S_M_WRT); break; case ps_CONST: - /* Const data psects are: PIC,OVR,REL,GBL,noSHR,noEXE,RD,noWRT. */ + /* Const data psects are: PIC,OVR,REL,GBL,noSHR,noEXE,RD,noWRT. */ Psect_Attributes = (GPS_S_M_PIC|GPS_S_M_OVR|GPS_S_M_REL|GPS_S_M_GBL |GPS_S_M_RD); break; case ps_CTORS: - /* Ctor psects are PIC,noOVR,REL,GBL,noSHR,noEXE,RD,noWRT. */ + /* Ctor psects are PIC,noOVR,REL,GBL,noSHR,noEXE,RD,noWRT. */ Psect_Attributes = (GPS_S_M_PIC|GPS_S_M_REL|GPS_S_M_GBL|GPS_S_M_RD); break; case ps_DTORS: - /* Dtor psects are PIC,noOVR,REL,GBL,noSHR,noEXE,RD,noWRT. */ + /* Dtor psects are PIC,noOVR,REL,GBL,noSHR,noEXE,RD,noWRT. */ Psect_Attributes = (GPS_S_M_PIC|GPS_S_M_REL|GPS_S_M_GBL|GPS_S_M_RD); break; default: @@ -3805,7 +3757,6 @@ VMS_Initialized_Data_Size (s0P, End_Of_Data) return (offsetT) (nearest_val - s0P_val); } - /* Check symbol names for the Psect hack with a globalvalue, and then generate globalvalues for those that have it. */ @@ -3883,7 +3834,7 @@ VMS_Emit_Globalvalues (text_siz, data_siz, Data_Segment) Size = VMS_Initialized_Data_Size (sp, text_siz + data_siz); if (Size > 4) error (_("Invalid data type for globalvalue")); - globalvalue = md_chars_to_number (Data_Segment + + globalvalue = md_chars_to_number (Data_Segment + S_GET_VALUE (sp) - text_siz , Size); /* Three times for good luck. The linker seems to get confused if there are fewer than three */ @@ -4533,7 +4484,6 @@ struct vms_obj_state { #define Local_Initd_Data_Size vms_obj_state.local_initd_data_size #define Data_Segment vms_obj_state.data_segment - #define IS_GXX_VTABLE(symP) (strncmp (S_GET_NAME (symP), "__vt.", 5) == 0) #define IS_GXX_XTOR(symP) (strncmp (S_GET_NAME (symP), "__GLOBAL_.", 10) == 0) #define XTOR_SIZE 4 @@ -4671,7 +4621,6 @@ synthesize_data_segment (data_siz, text_siz, data_frag_root) return; } - /* Perform data segment fixups. */ static void @@ -5105,7 +5054,6 @@ local_symbols_DST (s0P, Current_Routine) } } - /* Construct and output the debug symbol table. */ static void @@ -5429,7 +5377,6 @@ vms_write_object_file (text_siz, data_siz, bss_siz, text_frag_root, if (data_siz > 0) synthesize_data_segment (data_siz, text_siz, data_frag_root); - /******* Global Symbol Directory *******/ /* @@ -5473,7 +5420,6 @@ vms_write_object_file (text_siz, data_siz, bss_siz, text_frag_root, vsp->Psect_Index = Data_Psect; } - if (Ctors_Symbols != 0) { char *ps_name = "$ctors"; @@ -5524,12 +5470,10 @@ vms_write_object_file (text_siz, data_siz, bss_siz, text_frag_root, vms_fixup_xtors_section (Dtors_Symbols, Dtors_Psect); } - /******* Debugger Symbol Table Records *******/ vms_build_DST (text_siz); - /******* Wrap things up *******/ /* @@ -5545,5 +5489,3 @@ vms_write_object_file (text_siz, data_siz, bss_siz, text_frag_root, */ Close_VMS_Object_File (); } - -/* end of obj-vms.c */ diff --git a/gas/config/obj-vms.h b/gas/config/obj-vms.h index ad8fdce00d..16a3489706 100644 --- a/gas/config/obj-vms.h +++ b/gas/config/obj-vms.h @@ -1,5 +1,5 @@ /* VMS object file format - Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 96, 97, 1999 + Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 96, 97, 99, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -17,7 +17,7 @@ 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, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ +02111-1307, USA. */ /* Tag to validate a.out object file format processing */ #define OBJ_VMS 1 @@ -48,7 +48,7 @@ extern unsigned char const_flag; #define IN_DEFAULT_SECTION 0x80 -/* These are defined in obj-vms.c. */ +/* These are defined in obj-vms.c. */ extern const short seg_N_TYPE[]; extern const segT N_TYPE_seg[]; @@ -145,7 +145,7 @@ typedef struct nlist obj_symbol_type; /* Symbol table entry */ #define S_IS_DEBUG(s) ((s)->sy_symbol.n_type & N_STAB) /* True if a symbol is local symbol name */ /* A symbol name whose name begin with ^A is a gas internal pseudo symbol - nameless symbols come from .stab directives. */ + nameless symbols come from .stab directives. */ #define S_IS_LOCAL(s) (S_GET_NAME(s) && \ !S_IS_DEBUG(s) && \ (strchr(S_GET_NAME(s), '\001') != 0 || \ @@ -191,7 +191,6 @@ typedef struct nlist obj_symbol_type; /* Symbol table entry */ /* Set the n_type expression value */ #define S_SET_TYPE(s,v) ((s)->sy_symbol.n_type = (v)) - /* File header macro and type definition */ #define H_GET_TEXT_SIZE(h) ((h)->header.a_text) @@ -206,7 +205,7 @@ typedef struct nlist obj_symbol_type; /* Symbol table entry */ #define H_SET_SYMBOL_TABLE_SIZE(h,v) ((h)->header.a_syms = (v) * \ sizeof(struct nlist)) -/* line numbering stuff. */ +/* line numbering stuff. */ #define OBJ_EMIT_LINENO(a, b, c) {;} #define obj_symbol_new_hook(s) {;} @@ -223,7 +222,7 @@ extern void tc_aout_fix_to_chars PARAMS ((char *,struct fix *,relax_addressT)); extern int vms_resolve_symbol_redef PARAMS ((symbolS *)); #define RESOLVE_SYMBOL_REDEFINITION(X) vms_resolve_symbol_redef(X) -/* Compiler-generated label "__vax_g_doubles" is used to augment .stabs. */ +/* Compiler-generated label "__vax_g_doubles" is used to augment .stabs. */ extern void vms_check_for_special_label PARAMS ((symbolS *)); #define obj_frob_label(X) vms_check_for_special_label(X) @@ -547,5 +546,3 @@ extern void vms_write_object_file PARAMS ((unsigned,unsigned,unsigned, #define DBG_S_C_COMPLEX_ARRAY DST_K_TS_ARRAY #endif /* WANT_VMS_OBJ_DEFS */ - -/* end of obj-vms.h */