* obj.h: Likewise.
* output-file.c: Likewise.
* output-file.h: Likewise.
* sb.c: Likewise.
* sb.h: Likewise.
* stabs.c: Likewise.
* subsegs.c: Likewise.
* subsegs.h: Likewise.
* tc.h: Likewise.
+2003-12-02 Kazu Hirata <kazu@cs.umass.edu>
+
+ * messages.c: Convert to ISO-C.
+ * obj.h: Likewise.
+ * output-file.c: Likewise.
+ * output-file.h: Likewise.
+ * sb.c: Likewise.
+ * sb.h: Likewise.
+ * stabs.c: Likewise.
+ * subsegs.c: Likewise.
+ * subsegs.h: Likewise.
+ * tc.h: Likewise.
+
2003-12-02 Kazu Hirata <kazu@cs.umass.edu>
* config/obj-elf.c: Remove ARGSUSED.
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
-char *obj_default_output_file_name PARAMS ((void));
-void obj_emit_relocations PARAMS ((char **where, fixS * fixP,
- relax_addressT segment_address_in_file));
-void obj_emit_strings PARAMS ((char **where));
-void obj_emit_symbols PARAMS ((char **where, symbolS * symbols));
+char *obj_default_output_file_name (void);
+void obj_emit_relocations (char **where, fixS * fixP,
+ relax_addressT segment_address_in_file);
+void obj_emit_strings (char **where);
+void obj_emit_symbols (char **where, symbolS * symbols);
#ifndef obj_read_begin_hook
-void obj_read_begin_hook PARAMS ((void));
+void obj_read_begin_hook (void);
#endif
#ifndef BFD_ASSEMBLER
-void obj_crawl_symbol_chain PARAMS ((object_headers * headers));
-void obj_header_append PARAMS ((char **where, object_headers * headers));
+void obj_crawl_symbol_chain (object_headers * headers);
+void obj_header_append (char **where, object_headers * headers);
#ifndef obj_pre_write_hook
-void obj_pre_write_hook PARAMS ((object_headers * headers));
+void obj_pre_write_hook (object_headers * headers);
#endif
#endif
#ifndef obj_symbol_new_hook
-void obj_symbol_new_hook PARAMS ((symbolS * symbolP));
+void obj_symbol_new_hook (symbolS * symbolP);
#endif
-void obj_symbol_to_chars PARAMS ((char **where, symbolS * symbolP));
+void obj_symbol_to_chars (char **where, symbolS * symbolP);
extern const pseudo_typeS obj_pseudo_table[];
int flavor;
unsigned dfl_leading_underscore : 1;
unsigned emit_section_symbols : 1;
- void (*begin) PARAMS ((void));
- void (*app_file) PARAMS ((const char *));
- void (*frob_symbol) PARAMS ((symbolS *, int *));
- void (*frob_file) PARAMS ((void));
- void (*frob_file_before_adjust) PARAMS ((void));
- void (*frob_file_before_fix) PARAMS ((void));
- void (*frob_file_after_relocs) PARAMS ((void));
- bfd_vma (*s_get_size) PARAMS ((symbolS *));
- void (*s_set_size) PARAMS ((symbolS *, bfd_vma));
- bfd_vma (*s_get_align) PARAMS ((symbolS *));
- void (*s_set_align) PARAMS ((symbolS *, bfd_vma));
- int (*s_get_other) PARAMS ((symbolS *));
- void (*s_set_other) PARAMS ((symbolS *, int));
- int (*s_get_desc) PARAMS ((symbolS *));
- void (*s_set_desc) PARAMS ((symbolS *, int));
- int (*s_get_type) PARAMS ((symbolS *));
- void (*s_set_type) PARAMS ((symbolS *, int));
- void (*copy_symbol_attributes) PARAMS ((symbolS *, symbolS *));
- void (*generate_asm_lineno) PARAMS ((void));
- void (*process_stab) PARAMS ((segT, int, const char *, int, int, int));
- int (*separate_stab_sections) PARAMS ((void));
- void (*init_stab_section) PARAMS ((segT));
- int (*sec_sym_ok_for_reloc) PARAMS ((asection *));
- void (*pop_insert) PARAMS ((void));
+ void (*begin) (void);
+ void (*app_file) (const char *);
+ void (*frob_symbol) (symbolS *, int *);
+ void (*frob_file) (void);
+ void (*frob_file_before_adjust) (void);
+ void (*frob_file_before_fix) (void);
+ void (*frob_file_after_relocs) (void);
+ bfd_vma (*s_get_size) (symbolS *);
+ void (*s_set_size) (symbolS *, bfd_vma);
+ bfd_vma (*s_get_align) (symbolS *);
+ void (*s_set_align) (symbolS *, bfd_vma);
+ int (*s_get_other) (symbolS *);
+ void (*s_set_other) (symbolS *, int);
+ int (*s_get_desc) (symbolS *);
+ void (*s_set_desc) (symbolS *, int);
+ int (*s_get_type) (symbolS *);
+ void (*s_set_type) (symbolS *, int);
+ void (*copy_symbol_attributes) (symbolS *, symbolS *);
+ void (*generate_asm_lineno) (void);
+ void (*process_stab) (segT, int, const char *, int, int, int);
+ int (*separate_stab_sections) (void);
+ void (*init_stab_section) (segT);
+ int (*sec_sym_ok_for_reloc) (asection *);
+ void (*pop_insert) (void);
/* For configurations using ECOFF_DEBUGGING, this callback is used. */
- void (*ecoff_set_ext) PARAMS ((symbolS *, struct ecoff_extr *));
+ void (*ecoff_set_ext) (symbolS *, struct ecoff_extr *);
- void (*read_begin_hook) PARAMS ((void));
- void (*symbol_new_hook) PARAMS ((symbolS *));
+ void (*read_begin_hook) (void);
+ void (*symbol_new_hook) (symbolS *);
};
extern const struct format_ops elf_format_ops;
bfd *stdoutput;
void
-output_file_create (name)
- char *name;
+output_file_create (char *name)
{
if (name[0] == '-' && name[1] == '\0')
as_fatal (_("can't open a bfd on stdout %s"), name);
}
void
-output_file_close (filename)
- char *filename;
+output_file_close (char *filename)
{
#ifdef BFD_ASSEMBLER
/* Close the bfd. */
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. */
-void output_file_append PARAMS ((char *where, long length, char *filename));
-void output_file_close PARAMS ((char *filename));
-void output_file_create PARAMS ((char *name));
+void output_file_append (char *where, long length, char *filename);
+void output_file_close (char *filename);
+void output_file_create (char *name);
/* end of output-file.h */
#define dsize 5
-static void sb_check PARAMS ((sb *, int));
+static void sb_check (sb *, int);
/* Statistics of sb structures. */
/* initializes an sb. */
void
-sb_build (ptr, size)
- sb *ptr;
- int size;
+sb_build (sb *ptr, int size)
{
/* see if we can find one to allocate */
sb_element *e;
}
void
-sb_new (ptr)
- sb *ptr;
+sb_new (sb *ptr)
{
sb_build (ptr, dsize);
}
/* deallocate the sb at ptr */
void
-sb_kill (ptr)
- sb *ptr;
+sb_kill (sb *ptr)
{
/* return item to free list */
ptr->item->next = free_list.size[ptr->pot];
/* add the sb at s to the end of the sb at ptr */
void
-sb_add_sb (ptr, s)
- sb *ptr;
- sb *s;
+sb_add_sb (sb *ptr, sb *s)
{
sb_check (ptr, s->len);
memcpy (ptr->ptr + ptr->len, s->ptr, s->len);
and grow it if it doesn't. */
static void
-sb_check (ptr, len)
- sb *ptr;
- int len;
+sb_check (sb *ptr, int len)
{
if (ptr->len + len >= 1 << ptr->pot)
{
/* make the sb at ptr point back to the beginning. */
void
-sb_reset (ptr)
- sb *ptr;
+sb_reset (sb *ptr)
{
ptr->len = 0;
}
/* add character c to the end of the sb at ptr. */
void
-sb_add_char (ptr, c)
- sb *ptr;
- int c;
+sb_add_char (sb *ptr, int c)
{
sb_check (ptr, 1);
ptr->ptr[ptr->len++] = c;
/* add null terminated string s to the end of sb at ptr. */
void
-sb_add_string (ptr, s)
- sb *ptr;
- const char *s;
+sb_add_string (sb *ptr, const char *s)
{
int len = strlen (s);
sb_check (ptr, len);
/* add string at s of length len to sb at ptr */
void
-sb_add_buffer (ptr, s, len)
- sb *ptr;
- const char *s;
- int len;
+sb_add_buffer (sb *ptr, const char *s, int len)
{
sb_check (ptr, len);
memcpy (ptr->ptr + ptr->len, s, len);
/* print the sb at ptr to the output file */
void
-sb_print (outfile, ptr)
- FILE *outfile;
- sb *ptr;
+sb_print (FILE *outfile, sb *ptr)
{
int i;
int nc = 0;
}
void
-sb_print_at (outfile, idx, ptr)
- FILE *outfile;
- int idx;
- sb *ptr;
+sb_print_at (FILE *outfile, int idx, sb *ptr)
{
int i;
for (i = idx; i < ptr->len; i++)
string, so that it can be used as an arg to printf %s. */
char *
-sb_name (in)
- sb *in;
+sb_name (sb *in)
{
/* stick a null on the end of the string */
sb_add_char (in, 0);
/* like sb_name, but don't include the null byte in the string. */
char *
-sb_terminate (in)
- sb *in;
+sb_terminate (sb *in)
{
sb_add_char (in, 0);
--in->len;
whitespace. return the index of the first non whitespace character */
int
-sb_skip_white (idx, ptr)
- int idx;
- sb *ptr;
+sb_skip_white (int idx, sb *ptr)
{
while (idx < ptr->len
&& (ptr->ptr[idx] == ' '
next character. */
int
-sb_skip_comma (idx, ptr)
- int idx;
- sb *ptr;
+sb_skip_comma (int idx, sb *ptr)
{
while (idx < ptr->len
&& (ptr->ptr[idx] == ' '
extern int string_count[sb_max_power_two];
-extern void sb_build PARAMS ((sb *, int));
-extern void sb_new PARAMS ((sb *));
-extern void sb_kill PARAMS ((sb *));
-extern void sb_add_sb PARAMS ((sb *, sb *));
-extern void sb_reset PARAMS ((sb *));
-extern void sb_add_char PARAMS ((sb *, int));
-extern void sb_add_string PARAMS ((sb *, const char *));
-extern void sb_add_buffer PARAMS ((sb *, const char *, int));
-extern void sb_print PARAMS ((FILE *, sb *));
-extern void sb_print_at PARAMS ((FILE *, int, sb *));
-extern char *sb_name PARAMS ((sb *));
-extern char *sb_terminate PARAMS ((sb *));
-extern int sb_skip_white PARAMS ((int, sb *));
-extern int sb_skip_comma PARAMS ((int, sb *));
+extern void sb_build (sb *, int);
+extern void sb_new (sb *);
+extern void sb_kill (sb *);
+extern void sb_add_sb (sb *, sb *);
+extern void sb_reset (sb *);
+extern void sb_add_char (sb *, int);
+extern void sb_add_string (sb *, const char *);
+extern void sb_add_buffer (sb *, const char *, int);
+extern void sb_print (FILE *, sb *);
+extern void sb_print_at (FILE *, int, sb *);
+extern char *sb_name (sb *);
+extern char *sb_terminate (sb *);
+extern int sb_skip_white (int, sb *);
+extern int sb_skip_comma (int, sb *);
/* Actually in input-scrub.c. */
-extern void input_scrub_include_sb PARAMS ((sb *, char *, int));
+extern void input_scrub_include_sb (sb *, char *, int);
#endif /* SB_H */
int outputting_stabs_line_debug = 0;
-static void s_stab_generic PARAMS ((int, char *, char *));
-static void generate_asm_file PARAMS ((int, char *));
+static void s_stab_generic (int, char *, char *);
+static void generate_asm_file (int, char *);
/* Allow backends to override the names used for the stab sections. */
#ifndef STAB_SECTION_NAME
#endif
unsigned int
-get_stab_string_offset (string, stabstr_secname)
- const char *string;
- const char *stabstr_secname;
+get_stab_string_offset (const char *string, const char *stabstr_secname)
{
unsigned int length;
unsigned int retval;
kinds of stab sections. */
static void
-s_stab_generic (what, stab_secname, stabstr_secname)
- int what;
- char *stab_secname;
- char *stabstr_secname;
+s_stab_generic (int what, char *stab_secname, char *stabstr_secname)
{
long longint;
char *string, *saved_string_obstack_end;
/* Regular stab directive. */
void
-s_stab (what)
- int what;
+s_stab (int what)
{
s_stab_generic (what, STAB_SECTION_NAME, STAB_STRING_SECTION_NAME);
}
/* "Extended stabs", used in Solaris only now. */
void
-s_xstab (what)
- int what;
+s_xstab (int what)
{
int length;
char *stab_secname, *stabstr_secname;
/* Generate stabs debugging information to denote the main source file. */
void
-stabs_generate_asm_file ()
+stabs_generate_asm_file (void)
{
char *file;
unsigned int lineno;
TYPE is one of N_SO, N_SOL. */
static void
-generate_asm_file (type, file)
- int type;
- char *file;
+generate_asm_file (int type, char *file)
{
static char *last_file;
static int label_count;
used to produce debugging information for an assembler file. */
void
-stabs_generate_asm_lineno ()
+stabs_generate_asm_lineno (void)
{
static int label_count;
char *hold;
All assembler functions are assumed to have return type `void'. */
void
-stabs_generate_asm_func (funcname, startlabname)
- const char *funcname;
- const char *startlabname;
+stabs_generate_asm_func (const char *funcname, const char *startlabname)
{
static int void_emitted_p;
char *hold = input_line_pointer;
/* Emit a stab to record the end of a function. */
void
-stabs_generate_asm_endfunc (funcname, startlabname)
- const char *funcname ATTRIBUTE_UNUSED;
- const char *startlabname;
+stabs_generate_asm_endfunc (const char *funcname ATTRIBUTE_UNUSED,
+ const char *startlabname)
{
static int label_count;
char *hold = input_line_pointer;
#endif /* BFD_ASSEMBLER */
-static void subseg_set_rest PARAMS ((segT, subsegT));
+static void subseg_set_rest (segT, subsegT);
static fragS dummy_frag;
static frchainS absolute_frchain;
\f
void
-subsegs_begin ()
+subsegs_begin (void)
{
/* Check table(s) seg_name[], seg_N_TYPE[] is in correct order */
#if !defined (MANY_SEGMENTS) && !defined (BFD_ASSEMBLER)
* segment context correct.
*/
void
-subseg_change (seg, subseg)
- register segT seg;
- register int subseg;
+subseg_change (register segT seg, register int subseg)
{
now_seg = seg;
now_subseg = subseg;
}
\f
static void
-subseg_set_rest (seg, subseg)
- segT seg;
- subsegT subseg;
+subseg_set_rest (segT seg, subsegT subseg)
{
register frchainS *frcP; /* crawl frchain chain */
register frchainS **lastPP; /* address of last pointer */
#else /* BFD_ASSEMBLER */
segT
-subseg_get (segname, force_new)
- const char *segname;
- int force_new;
+subseg_get (const char *segname, int force_new)
{
segT secptr;
segment_info_type *seginfo;
}
segT
-subseg_new (segname, subseg)
- const char *segname;
- subsegT subseg;
+subseg_new (const char *segname, subsegT subseg)
{
segT secptr;
segment_info_type *seginfo;
/* Like subseg_new, except a new section is always created, even if
a section with that name already exists. */
segT
-subseg_force_new (segname, subseg)
- const char *segname;
- subsegT subseg;
+subseg_force_new (const char *segname, subsegT subseg)
{
segT secptr;
segment_info_type *seginfo;
}
void
-subseg_set (secptr, subseg)
- segT secptr;
- subsegT subseg;
+subseg_set (segT secptr, subsegT subseg)
{
if (! (secptr == now_seg && subseg == now_subseg))
subseg_set_rest (secptr, subseg);
/* Get the gas information we are storing for a section. */
segment_info_type *
-seg_info (sec)
- segT sec;
+seg_info (segT sec)
{
if (sec == bfd_abs_section_ptr)
return abs_seg_info;
}
symbolS *
-section_symbol (sec)
- segT sec;
+section_symbol (segT sec)
{
segment_info_type *seginfo = seg_info (sec);
symbolS *s;
#endif /* ! BFD_ASSEMBLER */
int
-subseg_text_p (sec)
- segT sec;
+subseg_text_p (segT sec)
{
#ifdef BFD_ASSEMBLER
return (bfd_get_section_flags (stdoutput, sec) & SEC_CODE) != 0;
}
void
-subsegs_print_statistics (file)
- FILE *file;
+subsegs_print_statistics (FILE *file)
{
frchainS *frchp;
fprintf (file, "frag chains:\n");
#ifdef BFD_ASSEMBLER
-extern segment_info_type *seg_info PARAMS ((segT));
-extern symbolS *section_symbol PARAMS ((segT));
+extern segment_info_type *seg_info (segT);
+extern symbolS *section_symbol (segT);
#else /* ! BFD_ASSEMBLER */
#endif /* ! BFD_ASSEMBLER */
-extern void subsegs_print_statistics PARAMS ((FILE *));
+extern void subsegs_print_statistics (FILE *);
extern const int md_reloc_size; /* Size of a relocation record */
-char *md_atof PARAMS ((int what_statement_type, char *literalP, int *sizeP));
+char *md_atof (int what_statement_type, char *literalP, int *sizeP);
#ifndef md_estimate_size_before_relax
-int md_estimate_size_before_relax PARAMS ((fragS * fragP, segT segment));
+int md_estimate_size_before_relax (fragS * fragP, segT segment);
#endif
-int md_parse_option PARAMS ((int c, char *arg));
-void md_show_usage PARAMS ((FILE *));
-long md_pcrel_from PARAMS ((fixS * fixP));
-short tc_coff_fix2rtype PARAMS ((fixS * fixP));
-void md_assemble PARAMS ((char *str));
-void md_begin PARAMS ((void));
+int md_parse_option (int c, char *arg);
+void md_show_usage (FILE *);
+long md_pcrel_from (fixS * fixP);
+short tc_coff_fix2rtype (fixS * fixP);
+void md_assemble (char *str);
+void md_begin (void);
#ifndef md_create_long_jump
-void md_create_long_jump PARAMS ((char *ptr, addressT from_addr,
- addressT to_addr, fragS * frag,
- symbolS * to_symbol));
+void md_create_long_jump (char *ptr, addressT from_addr,
+ addressT to_addr, fragS * frag,
+ symbolS * to_symbol);
#endif
#ifndef md_create_short_jump
-void md_create_short_jump PARAMS ((char *ptr, addressT from_addr,
- addressT to_addr, fragS * frag,
- symbolS * to_symbol));
+void md_create_short_jump (char *ptr, addressT from_addr,
+ addressT to_addr, fragS * frag,
+ symbolS * to_symbol);
#endif
-void md_number_to_chars PARAMS ((char *buf, valueT val, int n));
+void md_number_to_chars (char *buf, valueT val, int n);
#ifndef md_operand
-void md_operand PARAMS ((expressionS * expressionP));
+void md_operand (expressionS * expressionP);
#endif
-void md_apply_fix3 PARAMS ((fixS *, valueT *, segT));
+void md_apply_fix3 (fixS *, valueT *, segT);
#ifdef BFD_ASSEMBLER
#ifndef md_convert_frag
-void md_convert_frag PARAMS ((bfd * headers, segT sec, fragS * fragP));
+void md_convert_frag (bfd * headers, segT sec, fragS * fragP);
#endif
#ifndef tc_headers_hook
-void tc_headers_hook PARAMS ((segT *, fixS *));
+void tc_headers_hook (segT *, fixS *);
#endif
#ifndef RELOC_EXPANSION_POSSIBLE
-extern arelent *tc_gen_reloc PARAMS ((asection *, fixS *));
+extern arelent *tc_gen_reloc (asection *, fixS *);
#else
-extern arelent **tc_gen_reloc PARAMS ((asection *, fixS *));
+extern arelent **tc_gen_reloc (asection *, fixS *);
#endif
#else /* not BFD_ASSEMBLER */
#ifndef md_convert_frag
-void md_convert_frag PARAMS ((object_headers * headers, segT, fragS * fragP));
+void md_convert_frag (object_headers * headers, segT, fragS * fragP);
#endif
#ifndef tc_crawl_symbol_chain
-void tc_crawl_symbol_chain PARAMS ((object_headers * headers));
+void tc_crawl_symbol_chain (object_headers * headers);
#endif /* tc_crawl_symbol_chain */
#ifndef tc_headers_hook
-void tc_headers_hook PARAMS ((object_headers * headers));
+void tc_headers_hook (object_headers * headers);
#endif /* tc_headers_hook */
#endif /* BFD_ASSEMBLER */
#ifndef md_section_align
-valueT md_section_align PARAMS ((segT seg, valueT size));
+valueT md_section_align (segT seg, valueT size);
#endif
#ifndef md_undefined_symbol
-symbolS *md_undefined_symbol PARAMS ((char *name));
+symbolS *md_undefined_symbol (char *name);
#endif
/* end of tc.h */