ld/emultempl C90 version

Alan Modra amodra@bigpond.net.au
Fri Jun 27 00:39:00 GMT 2003


ld/ChangeLog
	* emultempl/aix.em: Convert to C90, remove unnecessary prototypes
	and casts.  Replace PTR with void *.  Formatting.
	* emultempl/alphaelf.em: Likewise
	* emultempl/armcoff.em: Likewise
	* emultempl/armelf.em: Likewise
	* emultempl/armelf_oabi.em: Likewise
	* emultempl/beos.em: Likewise
	* emultempl/elf32.em: Likewise
	* emultempl/generic.em: Likewise
	* emultempl/gld960.em: Likewise
	* emultempl/gld960c.em: Likewise
	* emultempl/hppaelf.em: Likewise
	* emultempl/linux.em: Likewise
	* emultempl/lnk960.em: Likewise
	* emultempl/m68hc1xelf.em: Likewise
	* emultempl/m68kcoff.em: Likewise
	* emultempl/m68kelf.em: Likewise
	* emultempl/mipsecoff.em: Likewise
	* emultempl/mipself.em: Likewise
	* emultempl/mmix-elfnmmo.em: Likewise
	* emultempl/mmixelf.em: Likewise
	* emultempl/mmo.em: Likewise
	* emultempl/needrelax.em: Likewise
	* emultempl/netbsd.em: Likewise
	* emultempl/pe.em: Likewise
	* emultempl/sh64elf.em: Likewise
	* emultempl/sunos.em: Likewise
	* emultempl/ticoff.em: Likewise
	* emultempl/vanilla.em: Likewise
	* emultempl/xtensaelf.em: Likewise
	* Makefile.am: Correct dependencies.
	* Makefile.in: Regenerate.

Index: ld/Makefile.am
===================================================================
RCS file: /cvs/src/src/ld/Makefile.am,v
retrieving revision 1.134
diff -u -p -w -r1.134 Makefile.am
--- ld/Makefile.am	10 Jun 2003 23:29:19 -0000	1.134
+++ ld/Makefile.am	27 Jun 2003 00:26:33 -0000
@@ -637,38 +637,42 @@ eelf32_i960.c: $(srcdir)/emulparams/elf3
   $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 	${GENSCRIPTS} elf32_i960 "$(tdir_elf32_i960)"
 eelf32b4300.c: $(srcdir)/emulparams/elf32b4300.sh \
-  $(srcdir)/emulparams/elf32bmip.sh \
+  $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emultempl/mipself.em \
   $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 	${GENSCRIPTS} elf32b4300 "$(tdir_elf32b4300)"
 eelf32bmip.c: $(srcdir)/emulparams/elf32bmip.sh \
+  $(srcdir)/emultempl/mipself.em \
   $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 	${GENSCRIPTS} elf32bmip "$(tdir_elf32bmip)"
 eelf32bsmip.c: $(srcdir)/emulparams/elf32bsmip.sh \
-  $(srcdir)/emulparams/elf32bmip.sh \
+  $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emultempl/mipself.em \
   $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 	${GENSCRIPTS} elf32bsmip "$(tdir_elf32bsmip)"
 eelf32btsmip.c: $(srcdir)/emulparams/elf32btsmip.sh \
-  $(srcdir)/emulparams/elf32bmip.sh \
+  $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emultempl/mipself.em \
   $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 	${GENSCRIPTS} elf32btsmip "$(tdir_elf32btsmip)"
 eelf32btsmipn32.c: $(srcdir)/emulparams/elf32btsmipn32.sh \
-  $(srcdir)/emulparams/elf32bmip.sh \
+  $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emultempl/mipself.em \
   $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 	${GENSCRIPTS} elf32btsmipn32 "$(tdir_elf32btsmipn32)"
 eelf32ltsmip.c: $(srcdir)/emulparams/elf32ltsmip.sh \
   $(srcdir)/emulparams/elf32btsmip.sh $(srcdir)/emulparams/elf32bmip.sh \
+  $(srcdir)/emultempl/mipself.em \
   $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 	${GENSCRIPTS} elf32ltsmip "$(tdir_elf32ltsmip)"
 eelf32ltsmipn32.c: $(srcdir)/emulparams/elf32ltsmipn32.sh \
   $(srcdir)/emulparams/elf32btsmip.sh $(srcdir)/emulparams/elf32bmip.sh \
+  $(srcdir)/emultempl/mipself.em \
   $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 	${GENSCRIPTS} elf32ltsmipn32 "$(tdir_elf32ltsmipn32)"
 eelf32ebmip.c: $(srcdir)/emulparams/elf32ebmip.sh \
-  $(srcdir)/emulparams/elf32bmip.sh \
+  $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emultempl/mipself.em \
   $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 	${GENSCRIPTS} elf32ebmip "$(tdir_elf32ebmip)"
 eelf32elmip.c: $(srcdir)/emulparams/elf32elmip.sh \
   $(srcdir)/emulparams/elf32lmip.sh $(srcdir)/emulparams/elf32bmip.sh \
+  $(srcdir)/emultempl/mipself.em \
   $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 	${GENSCRIPTS} elf32elmip "$(tdir_elf32elmip)"
 eelf32bmipn32.c: $(srcdir)/emulparams/elf32bmipn32.sh \
@@ -676,10 +680,11 @@ eelf32bmipn32.c: $(srcdir)/emulparams/el
 	${GENSCRIPTS} elf32bmipn32 "$(tdir_elf32bmipn32)"
 eelf32l4300.c: $(srcdir)/emulparams/elf32l4300.sh \
   $(srcdir)/emulparams/elf32b4300.sh $(srcdir)/emulparams/elf32bmip.sh \
+  $(srcdir)/emultempl/mipself.em \
   $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 	${GENSCRIPTS} elf32l4300 "$(tdir_elf32l4300)"
 eelf32lmip.c: $(srcdir)/emulparams/elf32lmip.sh \
-  $(srcdir)/emulparams/elf32bmip.sh \
+  $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emultempl/mipself.em \
   $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 	${GENSCRIPTS} elf32lmip "$(tdir_elf32lmip)"
 eelf32lppc.c: $(srcdir)/emulparams/elf32lppc.sh \
@@ -704,6 +709,7 @@ eelf32ppcwindiss.c: $(srcdir)/emulparams
 	${GENSCRIPTS} elf32ppcwindiss "$(tdir_elf32ppcwindiss)"
 eelf32lsmip.c: $(srcdir)/emulparams/elf32lsmip.sh \
   $(srcdir)/emulparams/elf32lmip.sh $(srcdir)/emulparams/elf32bmip.sh \
+  $(srcdir)/emultempl/mipself.em \
   $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 	${GENSCRIPTS} elf32lsmip "$(tdir_elf32lsmip)"
 eelf32openrisc.c: $(srcdir)/emulparams/elf32openrisc.sh \
@@ -970,16 +976,20 @@ elnk960.c: $(srcdir)/emulparams/lnk960.s
   $(srcdir)/emultempl/lnk960.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS}
 	${GENSCRIPTS} lnk960 "$(tdir_lnk960)"
 em68hc11elf.c: $(srcdir)/emulparams/m68hc11elf.sh \
-  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfm68hc11.sc ${GEN_DEPENDS}
+  $(srcdir)/emultempl/m68hc1xelf.em $(srcdir)/emultempl/elf32.em \
+  $(srcdir)/scripttempl/elfm68hc11.sc ${GEN_DEPENDS}
 	${GENSCRIPTS} m68hc11elf "$(tdir_m68hc11)"
 em68hc11elfb.c: $(srcdir)/emulparams/m68hc11elfb.sh \
-  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfm68hc11.sc ${GEN_DEPENDS}
+  $(srcdir)/emultempl/m68hc1xelf.em $(srcdir)/emultempl/elf32.em \
+  $(srcdir)/scripttempl/elfm68hc11.sc ${GEN_DEPENDS}
 	${GENSCRIPTS} m68hc11elfb "$(tdir_m68hc11b)"
 em68hc12elf.c: $(srcdir)/emulparams/m68hc12elf.sh \
-  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfm68hc12.sc ${GEN_DEPENDS}
+  $(srcdir)/emultempl/m68hc1xelf.em $(srcdir)/emultempl/elf32.em \
+  $(srcdir)/scripttempl/elfm68hc12.sc ${GEN_DEPENDS}
 	${GENSCRIPTS} m68hc12elf "$(tdir_m68hc12)"
 em68hc12elfb.c: $(srcdir)/emulparams/m68hc12elfb.sh \
-  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfm68hc12.sc ${GEN_DEPENDS}
+  $(srcdir)/emultempl/m68hc1xelf.em $(srcdir)/emultempl/elf32.em \
+  $(srcdir)/scripttempl/elfm68hc12.sc ${GEN_DEPENDS}
 	${GENSCRIPTS} m68hc12elfb "$(tdir_m68hc12b)"
 em68k4knbsd.c:	$(srcdir)/emulparams/m68k4knbsd.sh \
   $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
Index: ld/emultempl/aix.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/aix.em,v
retrieving revision 1.32
diff -u -p -w -r1.32 aix.em
--- ld/emultempl/aix.em	25 Jun 2003 06:40:26 -0000	1.32
+++ ld/emultempl/aix.em	27 Jun 2003 00:26:43 -0000
@@ -56,40 +56,11 @@ Foundation, Inc., 59 Temple Place - Suit
 #include "libcoff.h"
 #include "libxcoff.h"
 
-static void gld${EMULATION_NAME}_before_parse
-  PARAMS ((void));
-static bfd_boolean gld${EMULATION_NAME}_parse_args
-  PARAMS ((int, char **));
-static void gld${EMULATION_NAME}_add_options
-  PARAMS ((int, char **, int, struct option **, int, struct option **));
-static bfd_boolean gld${EMULATION_NAME}_handle_option
-  PARAMS ((int));
-static void gld${EMULATION_NAME}_after_open
-  PARAMS ((void));
-static char *gld${EMULATION_NAME}_choose_target
-  PARAMS ((int, char **));
-static void gld${EMULATION_NAME}_before_allocation
-  PARAMS ((void));
-static void gld${EMULATION_NAME}_read_file
-  PARAMS ((const char *, bfd_boolean));
-static void gld${EMULATION_NAME}_free
-  PARAMS ((PTR));
-static void gld${EMULATION_NAME}_find_relocs
-  PARAMS ((lang_statement_union_type *));
-static void gld${EMULATION_NAME}_find_exp_assignment
-  PARAMS ((etree_type *));
-static char *gld${EMULATION_NAME}_get_script
-  PARAMS ((int *isfile));
-static bfd_boolean gld${EMULATION_NAME}_unrecognized_file
-  PARAMS ((lang_input_statement_type *));
-static void gld${EMULATION_NAME}_create_output_section_statements
-  PARAMS ((void));
-static void gld${EMULATION_NAME}_set_output_arch
-  PARAMS ((void));
-static int is_syscall
-  PARAMS ((char *, unsigned int *));
-static int change_symbol_mode
-  PARAMS ((char *));
+static void gld${EMULATION_NAME}_read_file (const char *, bfd_boolean);
+static void gld${EMULATION_NAME}_free (void *);
+static void gld${EMULATION_NAME}_find_relocs (lang_statement_union_type *);
+static void gld${EMULATION_NAME}_find_exp_assignment (etree_type *);
+
 
 /* The file alignment required for each section.  */
 static unsigned long file_align;
@@ -160,7 +131,7 @@ static char *command_line_blibpath = NUL
 /* This routine is called before anything else is done.  */
 
 static void
-gld${EMULATION_NAME}_before_parse ()
+gld${EMULATION_NAME}_before_parse (void)
 {
   const bfd_arch_info_type *arch = bfd_scan_arch ("${OUTPUT_ARCH}");
   if (arch)
@@ -210,13 +181,9 @@ enum
   };
 
 static void
-gld${EMULATION_NAME}_add_options (ns, shortopts, nl, longopts, nrl, really_longopts)
-     int ns;
-     char **shortopts;
-     int nl;
-     struct option **longopts;
-     int nrl ATTRIBUTE_UNUSED;
-     struct option **really_longopts ATTRIBUTE_UNUSED;
+gld${EMULATION_NAME}_add_options
+  (int ns, char **shortopts, int nl, struct option **longopts,
+   int nrl ATTRIBUTE_UNUSED, struct option **really_longopts ATTRIBUTE_UNUSED)
 {
   static const char xtra_short[] = "D:H:KT:z";
   static const struct option xtra_long[] = {
@@ -291,15 +258,13 @@ gld${EMULATION_NAME}_add_options (ns, sh
 
   *shortopts = (char *) xrealloc (*shortopts, ns + sizeof (xtra_short));
   memcpy (*shortopts + ns, &xtra_short, sizeof (xtra_short));
-  *longopts = (struct option *)
-    xrealloc (*longopts, nl * sizeof (struct option) + sizeof (xtra_long));
+  *longopts = xrealloc (*longopts,
+			nl * sizeof (struct option) + sizeof (xtra_long));
   memcpy (*longopts + nl, &xtra_long, sizeof (xtra_long));
 }
 
 static bfd_boolean
-gld${EMULATION_NAME}_parse_args (argc, argv)
-     int argc;
-     char **argv;
+gld${EMULATION_NAME}_parse_args (int argc, char **argv)
 {
   int indx;
 
@@ -327,8 +292,7 @@ gld${EMULATION_NAME}_parse_args (argc, a
 }
 
 static bfd_boolean
-gld${EMULATION_NAME}_handle_option (optc)
-     int optc;
+gld${EMULATION_NAME}_handle_option (int optc)
 {
   bfd_signed_vma val;
   const char *end;
@@ -570,8 +534,7 @@ gld${EMULATION_NAME}_handle_option (optc
    as an import file.  This is for AIX compatibility.  */
 
 static bfd_boolean
-gld${EMULATION_NAME}_unrecognized_file (entry)
-     lang_input_statement_type *entry;
+gld${EMULATION_NAME}_unrecognized_file (lang_input_statement_type *entry)
 {
   FILE *e;
   bfd_boolean ret;
@@ -607,7 +570,7 @@ gld${EMULATION_NAME}_unrecognized_file (
 /* This is called after the input files have been opened.  */
 
 static void
-gld${EMULATION_NAME}_after_open ()
+gld${EMULATION_NAME}_after_open (void)
 {
   bfd_boolean r;
   struct set_info *p;
@@ -652,7 +615,7 @@ gld${EMULATION_NAME}_after_open ()
    sections, but before any sizes or addresses have been set.  */
 
 static void
-gld${EMULATION_NAME}_before_allocation ()
+gld${EMULATION_NAME}_before_allocation (void)
 {
   struct filelist *fl;
   struct export_symbol_list *el;
@@ -834,9 +797,7 @@ gld${EMULATION_NAME}_before_allocation (
 }
 
 static char *
-gld${EMULATION_NAME}_choose_target (argc, argv)
-     int argc;
-     char **argv;
+gld${EMULATION_NAME}_choose_target (int argc, char **argv)
 {
   int i, j, jmax;
   static char *from_outside;
@@ -871,8 +832,7 @@ gld${EMULATION_NAME}_choose_target (argc
    1 : state changed
    0 : no change */
 static int
-change_symbol_mode (input)
-     char *input;
+change_symbol_mode (char *input)
 {
   char *symbol_mode_string[] = {
     "# 32",			/* 0x01 */
@@ -906,9 +866,7 @@ change_symbol_mode (input)
    0 : ignore
    -1 : error, try something else */
 static int
-is_syscall (input, flag)
-     char *input;
-     unsigned int *flag;
+is_syscall (char *input, unsigned int *flag)
 {
   unsigned int bit;
   char *string;
@@ -958,9 +916,7 @@ is_syscall (input, flag)
    this is called by the handle_option emulation routine.  */
 
 static void
-gld${EMULATION_NAME}_read_file (filename, import)
-     const char *filename;
-     bfd_boolean import;
+gld${EMULATION_NAME}_read_file (const char *filename, bfd_boolean import)
 {
   struct obstack *o;
   FILE *f;
@@ -1201,8 +1157,7 @@ gld${EMULATION_NAME}_read_file (filename
 /* This routine saves us from worrying about declaring free.  */
 
 static void
-gld${EMULATION_NAME}_free (p)
-     PTR p;
+gld${EMULATION_NAME}_free (void *p)
 {
   free (p);
 }
@@ -1212,8 +1167,7 @@ gld${EMULATION_NAME}_free (p)
    to symbols.  */
 
 static void
-gld${EMULATION_NAME}_find_relocs (s)
-     lang_statement_union_type *s;
+gld${EMULATION_NAME}_find_relocs (lang_statement_union_type *s)
 {
   if (s->header.type == lang_reloc_statement_enum)
     {
@@ -1233,8 +1187,7 @@ gld${EMULATION_NAME}_find_relocs (s)
 /* Look through an expression for an assignment statement.  */
 
 static void
-gld${EMULATION_NAME}_find_exp_assignment (exp)
-     etree_type *exp;
+gld${EMULATION_NAME}_find_exp_assignment (etree_type *exp)
 {
   struct bfd_link_hash_entry *h;
 
@@ -1278,8 +1231,7 @@ gld${EMULATION_NAME}_find_exp_assignment
 }
 
 static char *
-gld${EMULATION_NAME}_get_script (isfile)
-     int *isfile;
+gld${EMULATION_NAME}_get_script (int *isfile)
 EOF
 
 if test -n "$COMPILE_IN"
@@ -1332,7 +1284,7 @@ fi
 cat >>e${EMULATION_NAME}.c <<EOF
 
 static void
-gld${EMULATION_NAME}_create_output_section_statements ()
+gld${EMULATION_NAME}_create_output_section_statements (void)
 {
   /* __rtinit */
   if ((bfd_get_flavour (output_bfd) == bfd_target_xcoff_flavour)
@@ -1371,7 +1323,7 @@ gld${EMULATION_NAME}_create_output_secti
 }
 
 static void
-gld${EMULATION_NAME}_set_output_arch ()
+gld${EMULATION_NAME}_set_output_arch (void)
 {
   bfd_set_arch_mach (output_bfd,
 		     bfd_xcoff_architecture (output_bfd),
Index: ld/emultempl/alphaelf.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/alphaelf.em,v
retrieving revision 1.2
diff -u -p -w -r1.2 alphaelf.em
--- ld/emultempl/alphaelf.em	25 Jun 2003 06:40:27 -0000	1.2
+++ ld/emultempl/alphaelf.em	27 Jun 2003 00:26:43 -0000
@@ -27,16 +27,13 @@ cat >>e${EMULATION_NAME}.c <<EOF
 #include "elf/alpha.h"
 #include "elf-bfd.h"
 
-static void alpha_after_parse PARAMS ((void));
-static void alpha_finish PARAMS ((void));
-
 static int elf64alpha_32bit = 0;
 
 /* Set the start address as in the Tru64 ld.  */
 #define ALPHA_TEXT_START_32BIT 0x12000000
 
 static void
-alpha_after_parse ()
+alpha_after_parse (void)
 {
   if (elf64alpha_32bit && !link_info.shared && !link_info.relocatable)
     lang_section_start (".interp",
@@ -46,7 +43,7 @@ alpha_after_parse ()
 }
 
 static void
-alpha_finish ()
+alpha_finish (void)
 {
   if (elf64alpha_32bit)
     elf_elfheader (output_bfd)->e_flags |= EF_ALPHA_32BIT;
Index: ld/emultempl/armcoff.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/armcoff.em,v
retrieving revision 1.16
diff -u -p -w -r1.16 armcoff.em
--- ld/emultempl/armcoff.em	25 Jun 2003 06:40:26 -0000	1.16
+++ ld/emultempl/armcoff.em	27 Jun 2003 00:26:43 -0000
@@ -40,18 +40,8 @@ Foundation, Inc., 59 Temple Place - Suit
 #include "ldfile.h"
 #include "ldemul.h"
 
-static void gld${EMULATION_NAME}_before_parse PARAMS ((void));
-static void gld${EMULATION_NAME}_before_allocation PARAMS ((void));
-static char *gld${EMULATION_NAME}_get_script PARAMS ((int *isfile));
-static void gld${EMULATION_NAME}_add_options
-  PARAMS ((int, char **, int, struct option **, int, struct option **));
-static void gld${EMULATION_NAME}_list_options PARAMS ((FILE *));
-static bfd_boolean gld${EMULATION_NAME}_handle_option PARAMS ((int));
-static void gld${EMULATION_NAME}_finish PARAMS ((void));
-static void gld${EMULATION_NAME}_after_open PARAMS ((void));
-
-/* If TRUE, then interworking stubs which support calls to old, non-interworking
-   aware ARM code should be generated.  */
+/* If TRUE, then interworking stubs which support calls to old,
+   non-interworking aware ARM code should be generated.  */
 
 static int support_old_code = 0;
 static char * thumb_entry_symbol = NULL;
@@ -60,13 +50,10 @@ static char * thumb_entry_symbol = NULL;
 #define OPTION_THUMB_ENTRY		301
 
 static void
-gld${EMULATION_NAME}_add_options (ns, shortopts, nl, longopts, nrl, really_longopts)
-     int ns ATTRIBUTE_UNUSED;
-     char **shortopts ATTRIBUTE_UNUSED;
-     int nl;
-     struct option **longopts;
-     int nrl ATTRIBUTE_UNUSED;
-     struct option **really_longopts ATTRIBUTE_UNUSED;
+gld${EMULATION_NAME}_add_options
+  (int ns ATTRIBUTE_UNUSED, char **shortopts ATTRIBUTE_UNUSED, int nl,
+   struct option **longopts, int nrl ATTRIBUTE_UNUSED,
+   struct option **really_longopts ATTRIBUTE_UNUSED)
 {
   static const struct option xtra_long[] = {
     {"support-old-code", no_argument, NULL, OPTION_SUPPORT_OLD_CODE},
@@ -74,22 +61,20 @@ gld${EMULATION_NAME}_add_options (ns, sh
     {NULL, no_argument, NULL, 0}
   };
 
-  *longopts = (struct option *)
-    xrealloc (*longopts, nl * sizeof (struct option) + sizeof (xtra_long));
+  *longopts = xrealloc (*longopts,
+			nl * sizeof (struct option) + sizeof (xtra_long));
   memcpy (*longopts + nl, &xtra_long, sizeof (xtra_long));
 }
 
 static void
-gld${EMULATION_NAME}_list_options (file)
-     FILE * file;
+gld${EMULATION_NAME}_list_options (FILE *file)
 {
   fprintf (file, _("  --support-old-code   Support interworking with old code\n"));
   fprintf (file, _("  --thumb-entry=<sym>  Set the entry point to be Thumb symbol <sym>\n"));
 }
 
 static bfd_boolean
-gld${EMULATION_NAME}_handle_option (optc)
-     int optc;
+gld${EMULATION_NAME}_handle_option (int optc)
 {
   switch (optc)
     {
@@ -109,7 +94,7 @@ gld${EMULATION_NAME}_handle_option (optc
 }
 
 static void
-gld${EMULATION_NAME}_before_parse ()
+gld${EMULATION_NAME}_before_parse (void)
 {
 #ifndef TARGET_			/* I.e., if not generic.  */
   ldfile_set_output_arch ("`echo ${ARCH}`");
@@ -120,7 +105,7 @@ gld${EMULATION_NAME}_before_parse ()
    sections, but before any sizes or addresses have been set.  */
 
 static void
-gld${EMULATION_NAME}_before_allocation ()
+gld${EMULATION_NAME}_before_allocation (void)
 {
   /* we should be able to set the size of the interworking stub section */
 
@@ -143,7 +128,7 @@ gld${EMULATION_NAME}_before_allocation (
 }
 
 static void
-gld${EMULATION_NAME}_after_open ()
+gld${EMULATION_NAME}_after_open (void)
 {
   if (strstr (bfd_get_target (output_bfd), "arm") == NULL)
     {
@@ -165,7 +150,7 @@ gld${EMULATION_NAME}_after_open ()
 }
 
 static void
-gld${EMULATION_NAME}_finish PARAMS((void))
+gld${EMULATION_NAME}_finish (void)
 {
   struct bfd_link_hash_entry * h;
 
@@ -209,8 +194,7 @@ gld${EMULATION_NAME}_finish PARAMS((void
 }
 
 static char *
-gld${EMULATION_NAME}_get_script (isfile)
-     int *isfile;
+gld${EMULATION_NAME}_get_script (int *isfile)
 EOF
 
 if test -n "$COMPILE_IN"
Index: ld/emultempl/armelf.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/armelf.em,v
retrieving revision 1.34
diff -u -p -w -r1.34 armelf.em
--- ld/emultempl/armelf.em	30 May 2003 08:19:30 -0000	1.34
+++ ld/emultempl/armelf.em	27 Jun 2003 00:26:43 -0000
@@ -28,9 +28,8 @@ static int no_pipeline_knowledge = 0;
 static char *thumb_entry_symbol = NULL;
 static bfd *bfd_for_interwork;
 
-
 static void
-gld${EMULATION_NAME}_before_parse ()
+gld${EMULATION_NAME}_before_parse (void)
 {
 #ifndef TARGET_			/* I.e., if not generic.  */
   ldfile_set_output_arch ("`echo ${ARCH}`");
@@ -39,10 +38,8 @@ gld${EMULATION_NAME}_before_parse ()
   config.has_shared = `if test -n "$GENERATE_SHLIB_SCRIPT" ; then echo TRUE ; else echo FALSE ; fi`;
 }
 
-static void arm_elf_after_open PARAMS ((void));
-
 static void
-arm_elf_after_open ()
+arm_elf_after_open (void)
 {
   if (strstr (bfd_get_target (output_bfd), "arm") == NULL)
     {
@@ -65,12 +62,8 @@ arm_elf_after_open ()
   gld${EMULATION_NAME}_after_open ();
 }
 
-static void arm_elf_set_bfd_for_interworking
-  PARAMS ((lang_statement_union_type *));
-
 static void
-arm_elf_set_bfd_for_interworking (statement)
-     lang_statement_union_type *statement;
+arm_elf_set_bfd_for_interworking (lang_statement_union_type *statement)
 {
   if (statement->header.type == lang_input_section_enum
       && !statement->input_section.ifile->just_syms_flag)
@@ -90,10 +83,8 @@ arm_elf_set_bfd_for_interworking (statem
     }
 }
 
-static void arm_elf_before_allocation PARAMS ((void));
-
 static void
-arm_elf_before_allocation ()
+arm_elf_before_allocation (void)
 {
   bfd *tem;
 
@@ -138,10 +129,8 @@ arm_elf_before_allocation ()
   bfd_elf32_arm_allocate_interworking_sections (& link_info);
 }
 
-static void arm_elf_finish PARAMS ((void));
-
 static void
-arm_elf_finish ()
+arm_elf_finish (void)
 {
   struct bfd_link_hash_entry * h;
 
Index: ld/emultempl/armelf_oabi.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/armelf_oabi.em,v
retrieving revision 1.12
diff -u -p -w -r1.12 armelf_oabi.em
--- ld/emultempl/armelf_oabi.em	25 Jun 2003 06:40:27 -0000	1.12
+++ ld/emultempl/armelf_oabi.em	27 Jun 2003 00:26:43 -0000
@@ -47,13 +47,8 @@ Foundation, Inc., 59 Temple Place - Suit
 #include "ldfile.h"
 #include "ldemul.h"
 
-static void gld${EMULATION_NAME}_before_parse PARAMS ((void));
-static void gld${EMULATION_NAME}_before_allocation PARAMS ((void));
-static char *gld${EMULATION_NAME}_get_script PARAMS ((int *isfile));
-static void gld${EMULATION_NAME}_after_open PARAMS ((void));
-
 static void
-gld${EMULATION_NAME}_before_parse ()
+gld${EMULATION_NAME}_before_parse (void)
 {
 #ifndef TARGET_			/* I.e., if not generic.  */
   ldfile_set_output_arch ("`echo ${ARCH}`");
@@ -64,7 +59,7 @@ gld${EMULATION_NAME}_before_parse ()
    sections, but before any sizes or addresses have been set.  */
 
 static void
-gld${EMULATION_NAME}_before_allocation ()
+gld${EMULATION_NAME}_before_allocation (void)
 {
   /* we should be able to set the size of the interworking stub section */
 
@@ -86,7 +81,7 @@ gld${EMULATION_NAME}_before_allocation (
 }
 
 static void
-gld${EMULATION_NAME}_after_open ()
+gld${EMULATION_NAME}_after_open (void)
 {
 
   LANG_FOR_EACH_INPUT_STATEMENT (is)
@@ -98,8 +93,7 @@ gld${EMULATION_NAME}_after_open ()
 }
 
 static char *
-gld${EMULATION_NAME}_get_script (isfile)
-     int *isfile;
+gld${EMULATION_NAME}_get_script (int *isfile)
 EOF
 
 if test -n "$COMPILE_IN"
Index: ld/emultempl/beos.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/beos.em,v
retrieving revision 1.22
diff -u -p -w -r1.22 beos.em
--- ld/emultempl/beos.em	25 Jun 2003 06:40:27 -0000	1.22
+++ ld/emultempl/beos.em	27 Jun 2003 00:26:43 -0000
@@ -51,33 +51,13 @@ Foundation, Inc., 59 Temple Place - Suit
 
 #define TARGET_IS_${EMULATION_NAME}
 
-static void gld_${EMULATION_NAME}_set_symbols PARAMS ((void));
-static void gld_${EMULATION_NAME}_after_open PARAMS ((void));
-static void gld_${EMULATION_NAME}_before_parse PARAMS ((void));
-static void gld_${EMULATION_NAME}_before_allocation PARAMS ((void));
-static bfd_boolean gld${EMULATION_NAME}_place_orphan
-  PARAMS ((lang_input_statement_type *, asection *));
-static char *gld_${EMULATION_NAME}_get_script PARAMS ((int *));
-
-static int sort_by_file_name PARAMS ((const PTR, const PTR));
-static int sort_by_section_name PARAMS ((const PTR, const PTR));
-static lang_statement_union_type **sort_sections_1
-  PARAMS ((lang_statement_union_type **, lang_statement_union_type *, int,
-	   int (*) PARAMS((const PTR, const PTR))));
-static void sort_sections PARAMS ((lang_statement_union_type *));
-
-static void set_pe_name PARAMS ((char *, long int));
-static void set_pe_subsystem PARAMS ((void));
-static void set_pe_value PARAMS ((char *));
-static void set_pe_stack_heap PARAMS ((char *, char *));
-
 static struct internal_extra_pe_aouthdr pe;
 static int dll;
 
 extern const char *output_filename;
 
 static void
-gld_${EMULATION_NAME}_before_parse()
+gld_${EMULATION_NAME}_before_parse (void)
 {
   const bfd_arch_info_type *arch = bfd_scan_arch ("${OUTPUT_ARCH}");
   if (arch)
@@ -109,17 +89,11 @@ gld_${EMULATION_NAME}_before_parse()
 #define OPTION_SUBSYSTEM                (OPTION_STACK + 1)
 #define OPTION_HEAP			(OPTION_SUBSYSTEM + 1)
 
-static void gld${EMULATION_NAME}_add_options
-  PARAMS ((int, char **, int, struct option **, int, struct option **));
-
 static void
-gld${EMULATION_NAME}_add_options (ns, shortopts, nl, longopts, nrl, really_longopts)
-     int ns ATTRIBUTE_UNUSED;
-     char **shortopts ATTRIBUTE_UNUSED;
-     int nl;
-     struct option **longopts;
-     int nrl ATTRIBUTE_UNUSED;
-     struct option **really_longopts ATTRIBUTE_UNUSED;
+gld${EMULATION_NAME}_add_options
+  (int ns ATTRIBUTE_UNUSED, char **shortopts ATTRIBUTE_UNUSED, int nl,
+   struct option **longopts, int nrl ATTRIBUTE_UNUSED,
+   struct option **really_longopts ATTRIBUTE_UNUSED)
 {
   static const struct option xtra_long[] = {
     /* PE options */
@@ -185,9 +159,7 @@ static definfo init[] =
 
 
 static void
-set_pe_name (name, val)
-     char *name;
-     long val;
+set_pe_name (char *name, long val)
 {
   int i;
   /* Find the name and set it. */
@@ -205,7 +177,7 @@ set_pe_name (name, val)
 
 
 static void
-set_pe_subsystem ()
+set_pe_subsystem (void)
 {
   const char *sver;
   int len;
@@ -281,11 +253,8 @@ set_pe_subsystem ()
 }
 
 
-
 static void
-set_pe_value (name)
-     char *name;
-
+set_pe_value (char *name)
 {
   char *end;
   set_pe_name (name,  strtoul (optarg, &end, 0));
@@ -298,9 +267,7 @@ set_pe_value (name)
 }
 
 static void
-set_pe_stack_heap (resname, comname)
-     char *resname;
-     char *comname;
+set_pe_stack_heap (char *resname, char *comname)
 {
   set_pe_value (resname);
   if (*optarg == ',')
@@ -315,12 +282,8 @@ set_pe_stack_heap (resname, comname)
 }
 
 
-static bfd_boolean gld${EMULATION_NAME}_handle_option
-  PARAMS ((int));
-
 static bfd_boolean
-gld${EMULATION_NAME}_handle_option (optc)
-     int optc;
+gld${EMULATION_NAME}_handle_option (int optc)
 {
   switch (optc)
     {
@@ -328,7 +291,7 @@ gld${EMULATION_NAME}_handle_option (optc
       return FALSE;
 
     case OPTION_BASE_FILE:
-      link_info.base_file = (PTR) fopen (optarg, FOPEN_WB);
+      link_info.base_file = fopen (optarg, FOPEN_WB);
       if (link_info.base_file == NULL)
 	{
 	  fprintf (stderr, "%s: Can't open base file %s\n",
@@ -385,7 +348,7 @@ gld${EMULATION_NAME}_handle_option (optc
    read.  */
 
 static void
-gld_${EMULATION_NAME}_set_symbols()
+gld_${EMULATION_NAME}_set_symbols (void)
 {
   /* Run through and invent symbols for all the
      names and insert the defaults. */
@@ -437,7 +400,7 @@ gld_${EMULATION_NAME}_set_symbols()
 }
 
 static void
-gld_${EMULATION_NAME}_after_open()
+gld_${EMULATION_NAME}_after_open (void)
 {
   /* Pass the wacky PE command line options into the output bfd.
      FIXME: This should be done via a function, rather than by
@@ -455,9 +418,7 @@ gld_${EMULATION_NAME}_after_open()
 /* Callback functions for qsort in sort_sections. */
 
 static int
-sort_by_file_name (a, b)
-     const PTR a;
-     const PTR b;
+sort_by_file_name (const void *a, const void *b)
 {
   const lang_statement_union_type *const *ra = a;
   const lang_statement_union_type *const *rb = b;
@@ -512,9 +473,7 @@ return 0;
 }
 
 static int
-sort_by_section_name (a, b)
-     const PTR a;
-     const PTR b;
+sort_by_section_name (const void *a, const void *b)
 {
   const lang_statement_union_type *const *ra = a;
   const lang_statement_union_type *const *rb = b;
@@ -539,10 +498,10 @@ sort_by_section_name (a, b)
    The result is a pointer to the last element's "next" pointer.  */
 
 static lang_statement_union_type **
-sort_sections_1 (startptr, next_after, count, sort_func)
-     lang_statement_union_type **startptr,*next_after;
-     int count;
-     int (*sort_func) PARAMS ((const PTR, const PTR));
+sort_sections_1 (lang_statement_union_type **startptr,
+		 lang_statement_union_type *next_after,
+		 int count,
+		 int (*sort_func) (const void *, const void *))
 {
   lang_statement_union_type **vec;
   lang_statement_union_type *p;
@@ -585,8 +544,7 @@ sort_sections_1 (startptr, next_after, c
    place_orphans routine to implement grouped sections.  */
 
 static void
-sort_sections (s)
-     lang_statement_union_type *s;
+sort_sections (lang_statement_union_type *s)
 {
   for (; s ; s = s->header.next)
     switch (s->header.type)
@@ -673,7 +631,7 @@ sort_sections (s)
 }
 
 static void
-gld_${EMULATION_NAME}_before_allocation()
+gld_${EMULATION_NAME}_before_allocation (void)
 {
   extern lang_statement_list_type *stat_ptr;
 
@@ -730,9 +688,7 @@ gld_${EMULATION_NAME}_before_allocation(
 
 /*ARGSUSED*/
 static bfd_boolean
-gld${EMULATION_NAME}_place_orphan (file, s)
-     lang_input_statement_type *file;
-     asection *s;
+gld${EMULATION_NAME}_place_orphan (lang_input_statement_type *file, asection *s)
 {
   const char *secname;
   char *output_secname, *ps;
@@ -821,8 +777,7 @@ gld${EMULATION_NAME}_place_orphan (file,
 }
 
 static char *
-gld_${EMULATION_NAME}_get_script(isfile)
-     int *isfile;
+gld_${EMULATION_NAME}_get_script (int *isfile)
 EOF
 # Scripts compiled in.
 # sed commands to quote an ld script as a C string.
Index: ld/emultempl/elf32.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/elf32.em,v
retrieving revision 1.100
diff -u -p -w -r1.100 elf32.em
--- ld/emultempl/elf32.em	25 Jun 2003 06:40:26 -0000	1.100
+++ ld/emultempl/elf32.em	27 Jun 2003 00:26:43 -0000
@@ -53,38 +53,13 @@ Foundation, Inc., 59 Temple Place - Suit
 #include <ldgram.h>
 #include "elf/common.h"
 
-static void gld${EMULATION_NAME}_before_parse
-  PARAMS ((void));
-static void gld${EMULATION_NAME}_vercheck
-  PARAMS ((lang_input_statement_type *));
-static void gld${EMULATION_NAME}_stat_needed
-  PARAMS ((lang_input_statement_type *));
-static bfd_boolean gld${EMULATION_NAME}_try_needed
-  PARAMS ((const char *, int));
-static bfd_boolean gld${EMULATION_NAME}_search_needed
-  PARAMS ((const char *, const char *, int));
-static void gld${EMULATION_NAME}_check_needed
-  PARAMS ((lang_input_statement_type *));
-static void gld${EMULATION_NAME}_after_open
-  PARAMS ((void));
-static void gld${EMULATION_NAME}_find_exp_assignment
-  PARAMS ((etree_type *));
-static void gld${EMULATION_NAME}_find_statement_assignment
-  PARAMS ((lang_statement_union_type *));
-static void gld${EMULATION_NAME}_before_allocation
-  PARAMS ((void));
-static bfd_boolean gld${EMULATION_NAME}_open_dynamic_archive
-  PARAMS ((const char *, search_dirs_type *, lang_input_statement_type *));
-static lang_output_section_statement_type *output_rel_find
-  PARAMS ((asection *));
-static asection *output_prev_sec_find
-  PARAMS ((lang_output_section_statement_type *));
+/* Declare functions used by various EXTRA_EM_FILEs.  */
+static void gld${EMULATION_NAME}_before_parse (void);
+static void gld${EMULATION_NAME}_after_open (void);
+static void gld${EMULATION_NAME}_before_allocation (void);
 static bfd_boolean gld${EMULATION_NAME}_place_orphan
-  PARAMS ((lang_input_statement_type *, asection *));
-static void gld${EMULATION_NAME}_finish
-  PARAMS ((void));
-static char *gld${EMULATION_NAME}_get_script
-  PARAMS ((int *isfile));
+  (lang_input_statement_type *file, asection *s);
+static void gld${EMULATION_NAME}_finish (void);
 
 EOF
 
@@ -104,7 +79,7 @@ if test x"$LDEMUL_BEFORE_PARSE" != xgld"
 cat >>e${EMULATION_NAME}.c <<EOF
 
 static void
-gld${EMULATION_NAME}_before_parse ()
+gld${EMULATION_NAME}_before_parse (void)
 {
   const bfd_arch_info_type *arch = bfd_scan_arch ("${OUTPUT_ARCH}");
   if (arch)
@@ -152,8 +127,7 @@ static bfd_boolean global_vercheck_faile
    a conflicting version.  */
 
 static void
-gld${EMULATION_NAME}_vercheck (s)
-     lang_input_statement_type *s;
+gld${EMULATION_NAME}_vercheck (lang_input_statement_type *s)
 {
   const char *soname;
   struct bfd_link_needed_list *l;
@@ -205,8 +179,7 @@ gld${EMULATION_NAME}_vercheck (s)
    the file.  */
 
 static void
-gld${EMULATION_NAME}_stat_needed (s)
-     lang_input_statement_type *s;
+gld${EMULATION_NAME}_stat_needed (lang_input_statement_type *s)
 {
   struct stat st;
   const char *suffix;
@@ -261,9 +234,7 @@ gld${EMULATION_NAME}_stat_needed (s)
    to skip the check for a conflicting version.  */
 
 static bfd_boolean
-gld${EMULATION_NAME}_try_needed (name, force)
-     const char *name;
-     int force;
+gld${EMULATION_NAME}_try_needed (const char *name, int force)
 {
   bfd *abfd;
   const char *soname;
@@ -393,10 +364,7 @@ cat >>e${EMULATION_NAME}.c <<EOF
 /* Search for a needed file in a path.  */
 
 static bfd_boolean
-gld${EMULATION_NAME}_search_needed (path, name, force)
-     const char *path;
-     const char *name;
-     int force;
+gld${EMULATION_NAME}_search_needed (const char *path, const char *name, int force)
 {
   const char *s;
   size_t len;
@@ -445,11 +413,8 @@ if [ "x${USE_LIBPATH}" = xyes ] ; then
 
 /* Add the sysroot to every entry in a colon-separated path.  */
 
-static char * gld${EMULATION_NAME}_add_sysroot PARAMS ((const char *));
-
 static char *
-gld${EMULATION_NAME}_add_sysroot (path)
-     const char *path;
+gld${EMULATION_NAME}_add_sysroot (const char *path)
 {
   int len, colons, i;
   char *ret, *p;
@@ -491,13 +456,8 @@ EOF
    in which we may find shared libraries.  /etc/ld.so.conf is really
    only meaningful on Linux.  */
 
-static bfd_boolean gld${EMULATION_NAME}_check_ld_so_conf
-  PARAMS ((const char *, int));
-
 static bfd_boolean
-gld${EMULATION_NAME}_check_ld_so_conf (name, force)
-     const char *name;
-     int force;
+gld${EMULATION_NAME}_check_ld_so_conf (const char *name, int force)
 {
   static bfd_boolean initialized;
   static char *ld_so_conf;
@@ -588,8 +548,7 @@ cat >>e${EMULATION_NAME}.c <<EOF
 /* See if an input file matches a DT_NEEDED entry by name.  */
 
 static void
-gld${EMULATION_NAME}_check_needed (s)
-     lang_input_statement_type *s;
+gld${EMULATION_NAME}_check_needed (lang_input_statement_type *s)
 {
   if (global_found)
     return;
@@ -638,7 +597,7 @@ cat >>e${EMULATION_NAME}.c <<EOF
 /* This is called after all the input files have been opened.  */
 
 static void
-gld${EMULATION_NAME}_after_open ()
+gld${EMULATION_NAME}_after_open (void)
 {
   struct bfd_link_needed_list *needed, *l;
 
@@ -794,8 +753,7 @@ cat >>e${EMULATION_NAME}.c <<EOF
 /* Look through an expression for an assignment statement.  */
 
 static void
-gld${EMULATION_NAME}_find_exp_assignment (exp)
-     etree_type *exp;
+gld${EMULATION_NAME}_find_exp_assignment (etree_type *exp)
 {
   struct bfd_link_hash_entry *h;
 
@@ -855,8 +813,7 @@ gld${EMULATION_NAME}_find_exp_assignment
    symbols which are referred to by dynamic objects.  */
 
 static void
-gld${EMULATION_NAME}_find_statement_assignment (s)
-     lang_statement_union_type *s;
+gld${EMULATION_NAME}_find_statement_assignment (lang_statement_union_type *s)
 {
   if (s->header.type == lang_assignment_statement_enum)
     gld${EMULATION_NAME}_find_exp_assignment (s->assignment_statement.exp);
@@ -883,7 +840,7 @@ cat >>e${EMULATION_NAME}.c <<EOF
    sections, but before any sizes or addresses have been set.  */
 
 static void
-gld${EMULATION_NAME}_before_allocation ()
+gld${EMULATION_NAME}_before_allocation (void)
 {
   const char *rpath;
   asection *sinterp;
@@ -964,10 +921,8 @@ cat >>e${EMULATION_NAME}.c <<EOF
    like hpux).  */
 
 static bfd_boolean
-gld${EMULATION_NAME}_open_dynamic_archive (arch, search, entry)
-     const char *arch;
-     search_dirs_type *search;
-     lang_input_statement_type *entry;
+gld${EMULATION_NAME}_open_dynamic_archive
+  (const char *arch, search_dirs_type *search, lang_input_statement_type *entry)
 {
   const char *filename;
   char *string;
@@ -1043,8 +998,7 @@ cat >>e${EMULATION_NAME}.c <<EOF
 /* A variant of lang_output_section_find.  Used by place_orphan.  */
 
 static lang_output_section_statement_type *
-output_rel_find (sec)
-     asection *sec;
+output_rel_find (asection *sec)
 {
   lang_statement_union_type *u;
   lang_output_section_statement_type *lookup;
@@ -1089,8 +1043,7 @@ output_rel_find (sec)
    Used by place_orphan.  */
 
 static asection *
-output_prev_sec_find (os)
-     lang_output_section_statement_type *os;
+output_prev_sec_find (lang_output_section_statement_type *os)
 {
   asection *s = (asection *) NULL;
   lang_statement_union_type *u;
@@ -1122,9 +1075,7 @@ struct orphan_save {
 };
 
 static bfd_boolean
-gld${EMULATION_NAME}_place_orphan (file, s)
-     lang_input_statement_type *file;
-     asection *s;
+gld${EMULATION_NAME}_place_orphan (lang_input_statement_type *file, asection *s)
 {
   static struct orphan_save hold_text;
   static struct orphan_save hold_rodata;
@@ -1422,7 +1373,7 @@ if test x"$LDEMUL_FINISH" != xgld"$EMULA
 cat >>e${EMULATION_NAME}.c <<EOF
 
 static void
-gld${EMULATION_NAME}_finish ()
+gld${EMULATION_NAME}_finish (void)
 {
   if (bfd_elf${ELFSIZE}_discard_info (output_bfd, &link_info))
     {
@@ -1447,8 +1398,7 @@ if test x"$LDEMUL_GET_SCRIPT" != xgld"$E
 cat >>e${EMULATION_NAME}.c <<EOF
 
 static char *
-gld${EMULATION_NAME}_get_script (isfile)
-     int *isfile;
+gld${EMULATION_NAME}_get_script (int *isfile)
 EOF
 
 if test -n "$COMPILE_IN"
@@ -1573,17 +1523,10 @@ cat >>e${EMULATION_NAME}.c <<EOF
 #define OPTION_GROUP			(OPTION_ENABLE_NEW_DTAGS + 1)
 #define OPTION_EH_FRAME_HDR		(OPTION_GROUP + 1)
 
-static void gld${EMULATION_NAME}_add_options
-  PARAMS ((int, char **, int, struct option **, int, struct option **));
-
 static void
-gld${EMULATION_NAME}_add_options (ns, shortopts, nl, longopts, nrl, really_longopts)
-     int ns;
-     char **shortopts;
-     int nl;
-     struct option **longopts;
-     int nrl ATTRIBUTE_UNUSED;
-     struct option **really_longopts ATTRIBUTE_UNUSED;
+gld${EMULATION_NAME}_add_options
+  (int ns, char **shortopts, int nl, struct option **longopts,
+   int nrl ATTRIBUTE_UNUSED, struct option **really_longopts ATTRIBUTE_UNUSED)
 {
   static const char xtra_short[] = "${PARSE_AND_LIST_SHORTOPTS}z:";
   static const struct option xtra_long[] = {
@@ -1615,12 +1558,8 @@ cat >>e${EMULATION_NAME}.c <<EOF
   memcpy (*longopts + nl, &xtra_long, sizeof (xtra_long));
 }
 
-static bfd_boolean gld${EMULATION_NAME}_handle_option
-  PARAMS ((int));
-
 static bfd_boolean
-gld${EMULATION_NAME}_handle_option (optc)
-     int optc;
+gld${EMULATION_NAME}_handle_option (int optc)
 {
   switch (optc)
     {
@@ -1716,11 +1655,8 @@ EOF
 if test x"$LDEMUL_LIST_OPTIONS" != xgld"$EMULATION_NAME"_list_options; then
 cat >>e${EMULATION_NAME}.c <<EOF
 
-static void gld${EMULATION_NAME}_list_options PARAMS ((FILE * file));
-
 static void
-gld${EMULATION_NAME}_list_options (file)
-     FILE * file;
+gld${EMULATION_NAME}_list_options (FILE * file)
 {
 EOF
 
Index: ld/emultempl/generic.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/generic.em,v
retrieving revision 1.12
diff -u -p -w -r1.12 generic.em
--- ld/emultempl/generic.em	25 Jun 2003 06:40:26 -0000	1.12
+++ ld/emultempl/generic.em	27 Jun 2003 00:26:43 -0000
@@ -39,9 +39,6 @@ Foundation, Inc., 59 Temple Place - Suit
 #include "ldfile.h"
 #include "ldemul.h"
 
-static void gld${EMULATION_NAME}_before_parse PARAMS ((void));
-static char *gld${EMULATION_NAME}_get_script PARAMS ((int *isfile));
-
 EOF
 
 # Import any needed special functions and/or overrides.
@@ -54,7 +51,7 @@ if test x"$LDEMUL_BEFORE_PARSE" != xgld"
 cat >>e${EMULATION_NAME}.c <<EOF
 
 static void
-gld${EMULATION_NAME}_before_parse()
+gld${EMULATION_NAME}_before_parse (void)
 {
 #ifndef TARGET_			/* I.e., if not generic.  */
   ldfile_set_output_arch ("`echo ${ARCH}`");
@@ -68,8 +65,7 @@ if test x"$LDEMUL_GET_SCRIPT" != xgld"$E
 cat >>e${EMULATION_NAME}.c <<EOF
 
 static char *
-gld${EMULATION_NAME}_get_script(isfile)
-     int *isfile;
+gld${EMULATION_NAME}_get_script (int *isfile)
 EOF
 
 if test -n "$COMPILE_IN"
Index: ld/emultempl/gld960.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/gld960.em,v
retrieving revision 1.12
diff -u -p -w -r1.12 gld960.em
--- ld/emultempl/gld960.em	25 Jun 2003 06:40:26 -0000	1.12
+++ ld/emultempl/gld960.em	27 Jun 2003 00:26:43 -0000
@@ -39,15 +39,10 @@ the Free Software Foundation, 59 Temple 
 #include "ldfile.h"
 #include "ldemul.h"
 
-static void gld960_before_parse PARAMS ((void));
-static char *gld960_choose_target PARAMS ((int, char **));
-static void gld960_set_output_arch PARAMS ((void));
-static char *gld960_get_script PARAMS ((int *));
-
 #ifdef GNU960
 
 static void
-gld960_before_parse()
+gld960_before_parse (void)
 {
   static char *env_variables[] = { "G960LIB", "G960BASE", 0 };
   char **p;
@@ -67,7 +62,7 @@ gld960_before_parse()
 
 #else	/* not GNU960 */
 
-static void gld960_before_parse()
+static void gld960_before_parse (void)
 {
   char *env ;
   env =  getenv("G960LIB");
@@ -84,15 +79,13 @@ static void gld960_before_parse()
 
 
 static void
-gld960_set_output_arch()
+gld960_set_output_arch (void)
 {
   bfd_set_arch_mach(output_bfd, ldfile_output_architecture, bfd_mach_i960_core);
 }
 
 static char *
-gld960_choose_target (argc, argv)
-     int argc ATTRIBUTE_UNUSED;
-     char **argv ATTRIBUTE_UNUSED;
+gld960_choose_target (int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
 {
 #ifdef GNU960
 
@@ -113,8 +106,7 @@ gld960_choose_target (argc, argv)
 }
 
 static char *
-gld960_get_script(isfile)
-     int *isfile;
+gld960_get_script (int *isfile)
 EOF
 
 if test -n "$COMPILE_IN"
Index: ld/emultempl/gld960c.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/gld960c.em,v
retrieving revision 1.13
diff -u -p -w -r1.13 gld960c.em
--- ld/emultempl/gld960c.em	25 Jun 2003 06:40:27 -0000	1.13
+++ ld/emultempl/gld960c.em	27 Jun 2003 00:26:43 -0000
@@ -41,15 +41,10 @@ Software Foundation, 59 Temple Place - S
 #include "ldfile.h"
 #include "ldemul.h"
 
-static void gld960_before_parse PARAMS ((void));
-static void gld960_set_output_arch PARAMS ((void));
-static char *gld960_choose_target PARAMS ((int, char **));
-static char *gld960_get_script PARAMS ((int *));
-
 #ifdef GNU960
 
 static void
-gld960_before_parse()
+gld960_before_parse (void)
 {
   static char *env_variables[] = { "G960LIB", "G960BASE", 0 };
   char **p;
@@ -69,7 +64,7 @@ gld960_before_parse()
 
 #else	/* not GNU960 */
 
-static void gld960_before_parse()
+static void gld960_before_parse (void)
 {
   char *env ;
   env =  getenv("G960LIB");
@@ -87,7 +82,7 @@ static void gld960_before_parse()
 
 
 static void
-gld960_set_output_arch()
+gld960_set_output_arch (void)
 {
   if (ldfile_output_machine_name != NULL
       && *ldfile_output_machine_name != '\0')
@@ -105,9 +100,7 @@ gld960_set_output_arch()
 }
 
 static char *
-gld960_choose_target (argc, argv)
-     int argc ATTRIBUTE_UNUSED;
-     char **argv ATTRIBUTE_UNUSED;
+gld960_choose_target (int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
 {
 #ifdef GNU960
 
@@ -128,8 +121,7 @@ gld960_choose_target (argc, argv)
 }
 
 static char *
-gld960_get_script(isfile)
-     int *isfile;
+gld960_get_script (int *isfile)
 EOF
 
 if test -n "$COMPILE_IN"
Index: ld/emultempl/hppaelf.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/hppaelf.em,v
retrieving revision 1.29
diff -u -p -w -r1.29 hppaelf.em
--- ld/emultempl/hppaelf.em	25 Jun 2003 06:40:27 -0000	1.29
+++ ld/emultempl/hppaelf.em	27 Jun 2003 00:26:43 -0000
@@ -27,14 +27,6 @@ cat >>e${EMULATION_NAME}.c <<EOF
 #include "ldctor.h"
 #include "elf32-hppa.h"
 
-static void hppaelf_after_parse PARAMS ((void));
-static void hppaelf_create_output_section_statements PARAMS ((void));
-static asection *hppaelf_add_stub_section
-  PARAMS ((const char *, asection *));
-static void hppaelf_layout_sections_again PARAMS ((void));
-static void gld${EMULATION_NAME}_finish PARAMS ((void));
-static void build_section_lists PARAMS ((lang_statement_union_type *));
-
 
 /* Fake input file for stubs.  */
 static lang_input_statement_type *stub_file;
@@ -56,7 +48,7 @@ static bfd_signed_vma group_size = 1;
    and adds millicode library to the list of input files.  */
 
 static void
-hppaelf_after_parse ()
+hppaelf_after_parse (void)
 {
   if (link_info.relocatable)
     lang_add_unique (".text");
@@ -72,7 +64,7 @@ hppaelf_after_parse ()
    fake input file to hold the stub sections.  */
 
 static void
-hppaelf_create_output_section_statements ()
+hppaelf_create_output_section_statements (void)
 {
   stub_file = lang_add_input_file ("linker stubs",
 				   lang_input_file_is_fake_enum,
@@ -99,13 +91,8 @@ struct hook_stub_info
 
 /* Traverse the linker tree to find the spot where the stub goes.  */
 
-static bfd_boolean hook_in_stub
-  PARAMS ((struct hook_stub_info *, lang_statement_union_type **));
-
 static bfd_boolean
-hook_in_stub (info, lp)
-     struct hook_stub_info *info;
-     lang_statement_union_type **lp;
+hook_in_stub (struct hook_stub_info *info, lang_statement_union_type **lp)
 {
   lang_statement_union_type *l;
   bfd_boolean ret;
@@ -177,9 +164,7 @@ hook_in_stub (info, lp)
    immediately before INPUT_SECTION.  */
 
 static asection *
-hppaelf_add_stub_section (stub_sec_name, input_section)
-     const char *stub_sec_name;
-     asection *input_section;
+hppaelf_add_stub_section (const char *stub_sec_name, asection *input_section)
 {
   asection *stub_sec;
   flagword flags;
@@ -220,7 +205,7 @@ hppaelf_add_stub_section (stub_sec_name,
 /* Another call-back for elf32_hppa_size_stubs.  */
 
 static void
-hppaelf_layout_sections_again ()
+hppaelf_layout_sections_again (void)
 {
   /* If we have changed sizes of the stub sections, then we need
      to recalculate all the section offsets.  This may mean we need to
@@ -243,8 +228,7 @@ hppaelf_layout_sections_again ()
 
 
 static void
-build_section_lists (statement)
-     lang_statement_union_type *statement;
+build_section_lists (lang_statement_union_type *statement)
 {
   if (statement->header.type == lang_input_section_enum
       && !statement->input_section.ifile->just_syms_flag
@@ -261,7 +245,7 @@ build_section_lists (statement)
    to build linker stubs.  */
 
 static void
-gld${EMULATION_NAME}_finish ()
+gld${EMULATION_NAME}_finish (void)
 {
   /* bfd_elf32_discard_info just plays with debugging sections,
      ie. doesn't affect any code, so we can delay resizing the
@@ -326,23 +310,16 @@ gld${EMULATION_NAME}_finish ()
 /* Avoid processing the fake stub_file in vercheck, stat_needed and
    check_needed routines.  */
 
-static void hppa_for_each_input_file_wrapper
-  PARAMS ((lang_input_statement_type *));
-static void hppa_lang_for_each_input_file
-  PARAMS ((void (*) (lang_input_statement_type *)));
-
-static void (*real_func) PARAMS ((lang_input_statement_type *));
+static void (*real_func) (lang_input_statement_type *);
 
-static void hppa_for_each_input_file_wrapper (l)
-     lang_input_statement_type *l;
+static void hppa_for_each_input_file_wrapper (lang_input_statement_type *l)
 {
   if (l != stub_file)
     (*real_func) (l);
 }
 
 static void
-hppa_lang_for_each_input_file (func)
-     void (*func) PARAMS ((lang_input_statement_type *));
+hppa_lang_for_each_input_file (void (*func) (lang_input_statement_type *))
 {
   real_func = func;
   lang_for_each_input_file (&hppa_for_each_input_file_wrapper);
Index: ld/emultempl/linux.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/linux.em,v
retrieving revision 1.12
diff -u -p -w -r1.12 linux.em
--- ld/emultempl/linux.em	25 Jun 2003 06:40:27 -0000	1.12
+++ ld/emultempl/linux.em	27 Jun 2003 00:26:43 -0000
@@ -44,18 +44,8 @@ Foundation, Inc., 59 Temple Place - Suit
 #include "ldfile.h"
 #include "ldemul.h"
 
-static void gld${EMULATION_NAME}_before_parse PARAMS ((void));
-static bfd_boolean gld${EMULATION_NAME}_open_dynamic_archive
-  PARAMS ((const char *, search_dirs_type *, lang_input_statement_type *));
-static void gld${EMULATION_NAME}_find_address_statement
-  PARAMS ((lang_statement_union_type *));
-static void gld${EMULATION_NAME}_create_output_section_statements
-  PARAMS ((void));
-static void gld${EMULATION_NAME}_before_allocation PARAMS ((void));
-static char *gld${EMULATION_NAME}_get_script PARAMS ((int *isfile));
-
 static void
-gld${EMULATION_NAME}_before_parse()
+gld${EMULATION_NAME}_before_parse (void)
 {
   const bfd_arch_info_type *arch = bfd_scan_arch ("${OUTPUT_ARCH}");
   if (arch)
@@ -74,10 +64,8 @@ gld${EMULATION_NAME}_before_parse()
    dynamic libraries have an extension of .sa.  */
 
 static bfd_boolean
-gld${EMULATION_NAME}_open_dynamic_archive (arch, search, entry)
-     const char *arch;
-     search_dirs_type *search;
-     lang_input_statement_type *entry;
+gld${EMULATION_NAME}_open_dynamic_archive
+  (const char *arch, search_dirs_type *search, lang_input_statement_type *entry)
 {
   char *string;
 
@@ -110,8 +98,7 @@ gld${EMULATION_NAME}_open_dynamic_archiv
    Linux tools.  */
 
 static void
-gld${EMULATION_NAME}_find_address_statement (s)
-     lang_statement_union_type *s;
+gld${EMULATION_NAME}_find_address_statement (lang_statement_union_type *s)
 {
   if (s->header.type == lang_address_statement_enum
       && strcmp (s->address_statement.section_name, ".text") == 0)
@@ -124,7 +111,7 @@ gld${EMULATION_NAME}_find_address_statem
 /* This is called before opening the input BFD's.  */
 
 static void
-gld${EMULATION_NAME}_create_output_section_statements ()
+gld${EMULATION_NAME}_create_output_section_statements (void)
 {
   lang_for_each_statement (gld${EMULATION_NAME}_find_address_statement);
 }
@@ -133,7 +120,7 @@ gld${EMULATION_NAME}_create_output_secti
    sections, but before any sizes or addresses have been set.  */
 
 static void
-gld${EMULATION_NAME}_before_allocation ()
+gld${EMULATION_NAME}_before_allocation (void)
 {
   if (link_info.relocatable)
     return;
@@ -145,8 +132,7 @@ gld${EMULATION_NAME}_before_allocation (
 }
 
 static char *
-gld${EMULATION_NAME}_get_script(isfile)
-     int *isfile;
+gld${EMULATION_NAME}_get_script (int *isfile)
 EOF
 
 if test -n "$COMPILE_IN"
Index: ld/emultempl/lnk960.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/lnk960.em,v
retrieving revision 1.12
diff -u -p -w -r1.12 lnk960.em
--- ld/emultempl/lnk960.em	25 Jun 2003 06:40:27 -0000	1.12
+++ ld/emultempl/lnk960.em	27 Jun 2003 00:26:43 -0000
@@ -47,23 +47,9 @@ static lib_list_type **hll_list_tail = &
 static lib_list_type *syslib_list;
 static lib_list_type **syslib_list_tail = &syslib_list;
 
-static void append PARAMS ((lib_list_type ***, char *));
-static void lnk960_hll PARAMS ((char *));
-static void lnk960_syslib PARAMS ((char *));
-static void lnk960_before_parse PARAMS ((void));
-static void add_on PARAMS ((lib_list_type *, lang_input_file_enum_type));
-static void lnk960_after_parse PARAMS ((void));
-static void lnk960_before_allocation PARAMS ((void));
-static void lnk960_after_allocation PARAMS ((void));
-static void lnk960_set_output_arch PARAMS ((void));
-static char *lnk960_choose_target PARAMS ((int, char **));
-static char *lnk960_get_script PARAMS ((int *));
-
 
 static void
-append (list, name)
-     lib_list_type ***list;
-     char *name;
+append (lib_list_type ***list, char *name)
 {
   lib_list_type *element = (lib_list_type *) xmalloc (sizeof (lib_list_type));
 
@@ -78,8 +64,7 @@ static bfd_boolean had_hll = FALSE;
 static bfd_boolean had_hll_name = FALSE;
 
 static void
-lnk960_hll (name)
-     char *name;
+lnk960_hll (char *name)
 {
   had_hll = TRUE;
   if (name != (char *) NULL)
@@ -90,8 +75,7 @@ lnk960_hll (name)
 }
 
 static void 
-lnk960_syslib (name)
-     char *name;
+lnk960_syslib (char *name)
 {
   append (&syslib_list_tail, name);
 }
@@ -100,7 +84,7 @@ lnk960_syslib (name)
 #ifdef GNU960
 
 static void 
-lnk960_before_parse ()
+lnk960_before_parse (void)
 {
   static char *env_variables[] = { "G960LIB", "G960BASE", 0 };
   char **p;
@@ -124,7 +108,7 @@ lnk960_before_parse ()
 #else	/* not GNU960 */
 
 static void 
-lnk960_before_parse ()
+lnk960_before_parse (void)
 {
   char *name = getenv ("I960BASE");
 
@@ -145,9 +129,7 @@ lnk960_before_parse ()
 
 
 static void
-add_on (list, search)
-     lib_list_type *list;
-     lang_input_file_enum_type search;
+add_on (lib_list_type *list, lang_input_file_enum_type search)
 {
   while (list)
     {
@@ -155,8 +137,9 @@ add_on (list, search)
       list = list->next;
     }
 }
+
 static void
-lnk960_after_parse ()
+lnk960_after_parse (void)
 {
   /* If there has been no arch, default to -KB */
   if (ldfile_output_machine_name[0] == 0)
@@ -177,12 +160,12 @@ lnk960_after_parse ()
 }
 
 static void
-lnk960_before_allocation ()
+lnk960_before_allocation (void)
 {
 }
 
 static void
-lnk960_after_allocation ()
+lnk960_after_allocation (void)
 {
   if (!link_info.relocatable)
     {
@@ -227,7 +210,7 @@ machine_table[] =
 };
 
 static void
-lnk960_set_output_arch ()
+lnk960_set_output_arch (void)
 {
   /* Set the output architecture and machine if possible */
   unsigned int i;
@@ -245,9 +228,7 @@ lnk960_set_output_arch ()
 }
 
 static char *
-lnk960_choose_target (argc, argv)
-    int argc ATTRIBUTE_UNUSED;
-    char **argv ATTRIBUTE_UNUSED;
+lnk960_choose_target (int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
 {
 #ifdef GNU960
 
@@ -268,8 +249,7 @@ lnk960_choose_target (argc, argv)
 }
 
 static char *
-lnk960_get_script (isfile)
-     int *isfile;
+lnk960_get_script (int *isfile)
 EOF
 
 if test -n "$COMPILE_IN"
Index: ld/emultempl/m68hc1xelf.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/m68hc1xelf.em,v
retrieving revision 1.2
diff -u -p -w -r1.2 m68hc1xelf.em
--- ld/emultempl/m68hc1xelf.em	25 Jun 2003 06:40:27 -0000	1.2
+++ ld/emultempl/m68hc1xelf.em	27 Jun 2003 00:26:44 -0000
@@ -44,12 +44,7 @@ cat >>e${EMULATION_NAME}.c <<EOF
 #include "ldctor.h"
 #include "elf32-m68hc1x.h"
 
-static void m68hc11elf_create_output_section_statements PARAMS ((void));
-static asection *m68hc11elf_add_stub_section
-  PARAMS ((const char *, asection *));
-static void gld${EMULATION_NAME}_finish PARAMS ((void));
-static void m68hc11_elf_${EMULATION_NAME}_before_allocation PARAMS ((void));
-
+static asection *m68hc11elf_add_stub_section (const char *, asection *);
 
 /* Fake input file for stubs.  */
 static lang_input_statement_type *stub_file;
@@ -64,7 +59,7 @@ static int no_trampoline = 0;
 static const char* bank_window_name = 0;
 
 static void
-m68hc11_elf_${EMULATION_NAME}_before_allocation ()
+m68hc11_elf_${EMULATION_NAME}_before_allocation (void)
 {
   lang_memory_region_type* region;
   int ret;
@@ -144,7 +139,7 @@ m68hc11_elf_${EMULATION_NAME}_before_all
    fake input file to hold the stub sections.  */
 
 static void
-m68hc11elf_create_output_section_statements ()
+m68hc11elf_create_output_section_statements (void)
 {
   stub_file = lang_add_input_file ("linker stubs",
 				   lang_input_file_is_fake_enum,
@@ -171,13 +166,8 @@ struct hook_stub_info
 
 /* Traverse the linker tree to find the spot where the stub goes.  */
 
-static bfd_boolean hook_in_stub
-  PARAMS ((struct hook_stub_info *, lang_statement_union_type **));
-
 static bfd_boolean
-hook_in_stub (info, lp)
-     struct hook_stub_info *info;
-     lang_statement_union_type **lp;
+hook_in_stub (struct hook_stub_info *info, lang_statement_union_type **lp)
 {
   lang_statement_union_type *l;
   bfd_boolean ret;
@@ -253,9 +243,8 @@ hook_in_stub (info, lp)
    immediately before INPUT_SECTION.  */
 
 static asection *
-m68hc11elf_add_stub_section (stub_sec_name, tramp_section)
-     const char *stub_sec_name;
-     asection *tramp_section;
+m68hc11elf_add_stub_section (const char *stub_sec_name,
+			     asection *tramp_section)
 {
   asection *stub_sec;
   flagword flags;
@@ -300,7 +289,7 @@ m68hc11elf_add_stub_section (stub_sec_na
    to build linker stubs.  */
 
 static void
-gld${EMULATION_NAME}_finish ()
+gld${EMULATION_NAME}_finish (void)
 {
   /* Now build the linker stubs.  */
   if (stub_file->the_bfd->sections != NULL)
@@ -325,23 +314,16 @@ gld${EMULATION_NAME}_finish ()
 /* Avoid processing the fake stub_file in vercheck, stat_needed and
    check_needed routines.  */
 
-static void m68hc11_for_each_input_file_wrapper
-  PARAMS ((lang_input_statement_type *));
-static void m68hc11_lang_for_each_input_file
-  PARAMS ((void (*) (lang_input_statement_type *)));
-
-static void (*real_func) PARAMS ((lang_input_statement_type *));
+static void (*real_func) (lang_input_statement_type *);
 
-static void m68hc11_for_each_input_file_wrapper (l)
-     lang_input_statement_type *l;
+static void m68hc11_for_each_input_file_wrapper (lang_input_statement_type *l)
 {
   if (l != stub_file)
     (*real_func) (l);
 }
 
 static void
-m68hc11_lang_for_each_input_file (func)
-     void (*func) PARAMS ((lang_input_statement_type *));
+m68hc11_lang_for_each_input_file (void (*func) (lang_input_statement_type *))
 {
   real_func = func;
   lang_for_each_input_file (&m68hc11_for_each_input_file_wrapper);
Index: ld/emultempl/m68kcoff.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/m68kcoff.em,v
retrieving revision 1.7
diff -u -p -w -r1.7 m68kcoff.em
--- ld/emultempl/m68kcoff.em	25 Jun 2003 06:40:27 -0000	1.7
+++ ld/emultempl/m68kcoff.em	27 Jun 2003 00:26:44 -0000
@@ -37,14 +37,10 @@ Foundation, Inc., 59 Temple Place - Suit
 #include "ldemul.h"
 #include "ldmisc.h"
 
-static void gld${EMULATION_NAME}_before_parse PARAMS ((void));
-static void gld${EMULATION_NAME}_after_open PARAMS ((void));
-static void check_sections PARAMS ((bfd *, asection *, PTR));
-static void gld${EMULATION_NAME}_after_allocation PARAMS ((void));
-static char *gld${EMULATION_NAME}_get_script PARAMS ((int *isfile));
+static void check_sections (bfd *, asection *, void *);
 
 static void
-gld${EMULATION_NAME}_before_parse ()
+gld${EMULATION_NAME}_before_parse (void)
 {
 #ifndef TARGET_			/* I.e., if not generic.  */
   ldfile_set_output_arch ("`echo ${ARCH}`");
@@ -58,7 +54,7 @@ gld${EMULATION_NAME}_before_parse ()
    time.  */
 
 static void
-gld${EMULATION_NAME}_after_open ()
+gld${EMULATION_NAME}_after_open (void)
 {
   bfd *abfd;
 
@@ -111,13 +107,10 @@ gld${EMULATION_NAME}_after_open ()
    relocs.  This is called via bfd_map_over_sections.  */
 
 static void
-check_sections (abfd, sec, datasec)
-     bfd *abfd;
-     asection *sec;
-     PTR datasec;
+check_sections (bfd *abfd, asection *sec, void *datasec)
 {
   if ((bfd_get_section_flags (abfd, sec) & SEC_DATA)
-      && sec != (asection *) datasec
+      && sec != datasec
       && sec->reloc_count != 0)
     einfo ("%B%X: section %s has relocs; can not use --embedded-relocs\n",
 	   abfd, bfd_get_section_name (abfd, sec));
@@ -128,7 +121,7 @@ check_sections (abfd, sec, datasec)
    BFD backend routine to do the work.  */
 
 static void
-gld${EMULATION_NAME}_after_allocation ()
+gld${EMULATION_NAME}_after_allocation (void)
 {
   bfd *abfd;
 
@@ -164,8 +157,7 @@ gld${EMULATION_NAME}_after_allocation ()
 }
 
 static char *
-gld${EMULATION_NAME}_get_script(isfile)
-     int *isfile;
+gld${EMULATION_NAME}_get_script (int *isfile)
 EOF
 
 if test -n "$COMPILE_IN"
Index: ld/emultempl/m68kelf.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/m68kelf.em,v
retrieving revision 1.5
diff -u -p -w -r1.5 m68kelf.em
--- ld/emultempl/m68kelf.em	25 Jun 2003 06:40:27 -0000	1.5
+++ ld/emultempl/m68kelf.em	27 Jun 2003 00:26:44 -0000
@@ -31,16 +31,14 @@ esac
 
 cat >>e${EMULATION_NAME}.c <<EOF
 
-static void m68k_elf_after_open PARAMS ((void));
 #ifdef SUPPORT_EMBEDDED_RELOCS
-static void check_sections PARAMS ((bfd *, asection *, PTR));
+static void check_sections (bfd *, asection *, void *);
 #endif
-static void m68k_elf_after_allocation PARAMS ((void));
 
 /* This function is run after all the input files have been opened.  */
 
 static void
-m68k_elf_after_open ()
+m68k_elf_after_open (void)
 {
   /* Call the standard elf routine.  */
   gld${EMULATION_NAME}_after_open ();
@@ -106,10 +104,7 @@ m68k_elf_after_open ()
    relocs.  This is called via bfd_map_over_sections.  */
 
 static void
-check_sections (abfd, sec, datasec)
-     bfd *abfd;
-     asection *sec;
-     PTR datasec;
+check_sections (bfd *abfd, asection *sec, PTR datasec)
 {
   if ((bfd_get_section_flags (abfd, sec) & SEC_DATA)
       && sec != (asection *) datasec
@@ -124,7 +119,7 @@ check_sections (abfd, sec, datasec)
    been set.  */
 
 static void
-m68k_elf_after_allocation ()
+m68k_elf_after_allocation (void)
 {
   /* Call the standard elf routine.  */
   after_allocation_default ();
Index: ld/emultempl/mipsecoff.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/mipsecoff.em,v
retrieving revision 1.12
diff -u -p -w -r1.12 mipsecoff.em
--- ld/emultempl/mipsecoff.em	25 Jun 2003 06:40:26 -0000	1.12
+++ ld/emultempl/mipsecoff.em	27 Jun 2003 00:26:44 -0000
@@ -44,14 +44,10 @@ Foundation, Inc., 59 Temple Place - Suit
 #include "ldfile.h"
 #include "ldemul.h"
 
-static void gld${EMULATION_NAME}_before_parse PARAMS ((void));
-static void gld${EMULATION_NAME}_after_open PARAMS ((void));
-static void check_sections PARAMS ((bfd *, asection *, PTR));
-static void gld${EMULATION_NAME}_after_allocation PARAMS ((void));
-static char *gld${EMULATION_NAME}_get_script PARAMS ((int *isfile));
+static void check_sections (bfd *, asection *, void *);
 
 static void
-gld${EMULATION_NAME}_before_parse()
+gld${EMULATION_NAME}_before_parse (void)
 {
 #ifndef TARGET_			/* I.e., if not generic.  */
   const bfd_arch_info_type *arch = bfd_scan_arch ("${OUTPUT_ARCH}");
@@ -74,7 +70,7 @@ gld${EMULATION_NAME}_before_parse()
    have been compiled using -membedded-pic.  */
 
 static void
-gld${EMULATION_NAME}_after_open ()
+gld${EMULATION_NAME}_after_open (void)
 {
   bfd *abfd;
 
@@ -119,7 +115,7 @@ gld${EMULATION_NAME}_after_open ()
 
       /* Double check that all other data sections are empty, as is
          required for embedded PIC code.  */
-      bfd_map_over_sections (abfd, check_sections, (PTR) datasec);
+      bfd_map_over_sections (abfd, check_sections, datasec);
     }
 }
 
@@ -127,13 +123,10 @@ gld${EMULATION_NAME}_after_open ()
    relocs.  This is called via bfd_map_over_sections.  */
 
 static void
-check_sections (abfd, sec, sdatasec)
-     bfd *abfd;
-     asection *sec;
-     PTR sdatasec;
+check_sections (bfd *abfd, asection *sec, void *sdatasec)
 {
   if ((bfd_get_section_flags (abfd, sec) & SEC_CODE) == 0
-      && sec != (asection *) sdatasec
+      && sec != sdatasec
       && sec->reloc_count != 0)
     einfo ("%B%X: section %s has relocs; can not use --embedded-relocs\n",
 	   abfd, bfd_get_section_name (abfd, sec));
@@ -144,7 +137,7 @@ check_sections (abfd, sec, sdatasec)
    BFD backend routine to do the work.  */
 
 static void
-gld${EMULATION_NAME}_after_allocation ()
+gld${EMULATION_NAME}_after_allocation (void)
 {
   bfd *abfd;
 
@@ -180,8 +173,7 @@ gld${EMULATION_NAME}_after_allocation ()
 }
 
 static char *
-gld${EMULATION_NAME}_get_script(isfile)
-     int *isfile;
+gld${EMULATION_NAME}_get_script (int *isfile)
 EOF
 
 if test -n "$COMPILE_IN"
Index: ld/emultempl/mipself.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/mipself.em,v
retrieving revision 1.4
diff -u -p -w -r1.4 mipself.em
--- ld/emultempl/mipself.em	25 Jun 2003 06:40:27 -0000	1.4
+++ ld/emultempl/mipself.em	27 Jun 2003 00:26:44 -0000
@@ -1,3 +1,4 @@
+# This shell script emits a C file. -*- C -*-
 # Copyright 2002, 2003 Free Software Foundation, Inc.
 #   Written by Mitch Lichtenberg <mpl@broadcom.com> and
 #   Chris Demetriou <cgd@broadcom.com> based on m68kelf.em and mipsecoff.em.
@@ -17,7 +18,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-# This shell script emits a C file. -*- C -*-
 
 
 # This file is sourced from elf32.em, and defines some extra routines for m68k
@@ -33,17 +33,14 @@ esac
 
 cat >>e${EMULATION_NAME}.c <<EOF
 
-static void mips_elf${ELFSIZE}_after_open PARAMS ((void));
 #ifdef SUPPORT_EMBEDDED_RELOCS
-static void mips_elf${ELFSIZE}_check_sections PARAMS ((bfd *, asection *,
-						       PTR));
+static void mips_elf${ELFSIZE}_check_sections (bfd *, asection *, void *);
 #endif
-static void mips_elf${ELFSIZE}_after_allocation PARAMS ((void));
 
 /* This function is run after all the input files have been opened.  */
 
 static void
-mips_elf${ELFSIZE}_after_open()
+mips_elf${ELFSIZE}_after_open (void)
 {
   /* Call the standard elf routine.  */
   gld${EMULATION_NAME}_after_open ();
@@ -105,7 +102,7 @@ mips_elf${ELFSIZE}_after_open()
           /* Double check that all other data sections have no relocs,
              as is required for embedded PIC code.  */
           bfd_map_over_sections (abfd, mips_elf${ELFSIZE}_check_sections,
-				 (PTR) datasec);
+				 datasec);
         }
     }
 #endif /* SUPPORT_EMBEDDED_RELOCS */
@@ -116,13 +113,10 @@ mips_elf${ELFSIZE}_after_open()
    relocs.  This is called via bfd_map_over_sections.  */
 
 static void
-mips_elf${ELFSIZE}_check_sections (abfd, sec, sdatasec)
-     bfd *abfd;
-     asection *sec;
-     PTR sdatasec;
+mips_elf${ELFSIZE}_check_sections (bfd *abfd, asection *sec, void *sdatasec)
 {
   if ((bfd_get_section_flags (abfd, sec) & SEC_DATA)
-      && sec != (asection *) sdatasec
+      && sec != sdatasec
       && sec->reloc_count != 0)
     einfo ("%B%X: section %s has relocs; cannot use --embedded-relocs\n",
 	   abfd, bfd_get_section_name (abfd, sec));
@@ -134,7 +128,7 @@ mips_elf${ELFSIZE}_check_sections (abfd,
    BFD backend routine to do the work.  */
 
 static void
-mips_elf${ELFSIZE}_after_allocation ()
+mips_elf${ELFSIZE}_after_allocation (void)
 {
   /* Call the standard elf routine.  */
   after_allocation_default ();
Index: ld/emultempl/mmix-elfnmmo.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/mmix-elfnmmo.em,v
retrieving revision 1.8
diff -u -p -w -r1.8 mmix-elfnmmo.em
--- ld/emultempl/mmix-elfnmmo.em	25 Jun 2003 06:40:27 -0000	1.8
+++ ld/emultempl/mmix-elfnmmo.em	27 Jun 2003 00:26:44 -0000
@@ -24,13 +24,10 @@
 cat >>e${EMULATION_NAME}.c <<EOF
 #include "elf/mmix.h"
 
-static void mmix_before_allocation PARAMS ((void));
-static void mmix_after_allocation PARAMS ((void));
-
 /* Set up handling of linker-allocated global registers.  */
 
 static void
-mmix_before_allocation ()
+mmix_before_allocation (void)
 {
   /* Call the default first.  */
   gld${EMULATION_NAME}_before_allocation ();
@@ -55,7 +52,7 @@ mmix_before_allocation ()
    GREGs.  */
 
 static void
-mmix_after_allocation ()
+mmix_after_allocation (void)
 {
   asection *sec
     = bfd_get_section_by_name (output_bfd, MMIX_REG_CONTENTS_SECTION_NAME);
Index: ld/emultempl/mmixelf.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/mmixelf.em,v
retrieving revision 1.2
diff -u -p -w -r1.2 mmixelf.em
--- ld/emultempl/mmixelf.em	30 Nov 2002 08:39:46 -0000	1.2
+++ ld/emultempl/mmixelf.em	27 Jun 2003 00:26:44 -0000
@@ -1,5 +1,5 @@
 # This shell script emits a C file. -*- C -*-
-#   Copyright 2001, 2002 Free Software Foundation, Inc.
+#   Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
 #
 # This file is part of GLD, the Gnu Linker.
 #
@@ -26,10 +26,8 @@
 cat >>e${EMULATION_NAME}.c <<EOF
 #line 29 "${srcdir}/emultempl/elfmmix.em"
 
-static void elfmmix_before_parse PARAMS ((void));
-
 static void
-elfmmix_before_parse ()
+elfmmix_before_parse (void)
 {
   gld${EMULATION_NAME}_before_parse ();
 
Index: ld/emultempl/mmo.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/mmo.em,v
retrieving revision 1.10
diff -u -p -w -r1.10 mmo.em
--- ld/emultempl/mmo.em	25 Jun 2003 06:40:27 -0000	1.10
+++ ld/emultempl/mmo.em	27 Jun 2003 00:26:44 -0000
@@ -32,22 +32,13 @@ EOF
 
 cat >>e${EMULATION_NAME}.c <<EOF
 
-static bfd_boolean mmo_place_orphan
-  PARAMS ((lang_input_statement_type *, asection *));
-static asection *output_prev_sec_find
-  PARAMS ((lang_output_section_statement_type *));
-static void mmo_finish PARAMS ((void));
-static void mmo_wipe_sec_reloc_flag PARAMS ((bfd *, asection *, PTR));
-static void mmo_after_open PARAMS ((void));
-
 /* Find the last output section before given output statement.
    Used by place_orphan.  */
 
 static asection *
-output_prev_sec_find (os)
-     lang_output_section_statement_type *os;
+output_prev_sec_find (lang_output_section_statement_type *os)
 {
-  asection *s = (asection *) NULL;
+  asection *s = NULL;
   lang_statement_union_type *u;
   lang_output_section_statement_type *lookup;
 
@@ -85,9 +76,7 @@ struct orphan_save {
    from elf32.em.  */
 
 static bfd_boolean
-mmo_place_orphan (file, s)
-	lang_input_statement_type *file;
-	asection *s;
+mmo_place_orphan (lang_input_statement_type *file, asection *s)
 {
   static struct orphan_save hold_text;
   struct orphan_save *place;
@@ -227,10 +216,7 @@ mmo_place_orphan (file, s)
    paper over the bug similarly.  */
 
 static void
-mmo_wipe_sec_reloc_flag (abfd, sec, ptr)
-     bfd *abfd;
-     asection *sec;
-     PTR ptr ATTRIBUTE_UNUSED;
+mmo_wipe_sec_reloc_flag (bfd *abfd, asection *sec, void *ptr ATTRIBUTE_UNUSED)
 {
   bfd_set_section_flags (abfd, sec,
 			 bfd_get_section_flags (abfd, sec) & ~SEC_RELOC);
@@ -239,7 +225,7 @@ mmo_wipe_sec_reloc_flag (abfd, sec, ptr)
 /* Iterate with bfd_map_over_sections over mmo_wipe_sec_reloc_flag... */
 
 static void
-mmo_finish ()
+mmo_finish (void)
 {
   bfd_map_over_sections (output_bfd, mmo_wipe_sec_reloc_flag, NULL);
 }
@@ -251,7 +237,7 @@ mmo_finish ()
    when all input files are seen, which is equivalent.  */
 
 static void
-mmo_after_open ()
+mmo_after_open (void)
 {
   /* When there's a mismatch between the output format and the emulation
      (using weird combinations like "-m mmo --oformat elf64-mmix" for
Index: ld/emultempl/needrelax.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/needrelax.em,v
retrieving revision 1.3
diff -u -p -w -r1.3 needrelax.em
--- ld/emultempl/needrelax.em	25 Jun 2003 06:40:27 -0000	1.3
+++ ld/emultempl/needrelax.em	27 Jun 2003 00:26:44 -0000
@@ -25,10 +25,8 @@ LDEMUL_BEFORE_ALLOCATION=need_relax_${EM
 
 cat >>e${EMULATION_NAME}.c <<EOF
 
-static void need_relax_${EMULATION_NAME}_before_allocation PARAMS ((void));
-
 static void
-need_relax_${EMULATION_NAME}_before_allocation ()
+need_relax_${EMULATION_NAME}_before_allocation (void)
 {
   /* Call main function; we're just extending it.  */
   gld${EMULATION_NAME}_before_allocation ();
Index: ld/emultempl/netbsd.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/netbsd.em,v
retrieving revision 1.2
diff -u -p -w -r1.2 netbsd.em
--- ld/emultempl/netbsd.em	28 Feb 2003 01:32:31 -0000	1.2
+++ ld/emultempl/netbsd.em	27 Jun 2003 00:26:44 -0000
@@ -1,9 +1,8 @@
 LDEMUL_BEFORE_PARSE=gldnetbsd_before_parse
-cat >>e${EMULATION_NAME}.c <<EOF
-static void gldnetbsd_before_parse PARAMS ((void));
 
+cat >>e${EMULATION_NAME}.c <<EOF
 static void
-gldnetbsd_before_parse ()
+gldnetbsd_before_parse (void)
 {
   gld${EMULATION_NAME}_before_parse ();
   link_info.common_skip_ar_aymbols = bfd_link_common_skip_text;
Index: ld/emultempl/pe.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/pe.em,v
retrieving revision 1.79
diff -u -p -w -r1.79 pe.em
--- ld/emultempl/pe.em	25 Jun 2003 06:40:27 -0000	1.79
+++ ld/emultempl/pe.em	27 Jun 2003 00:26:46 -0000
@@ -103,44 +103,6 @@ cat >>e${EMULATION_NAME}.c <<EOF
 #define PE_DEF_FILE_ALIGNMENT		0x00000200
 #endif
 
-static void gld_${EMULATION_NAME}_set_symbols PARAMS ((void));
-static void gld_${EMULATION_NAME}_after_open PARAMS ((void));
-static void gld_${EMULATION_NAME}_before_parse PARAMS ((void));
-static void gld_${EMULATION_NAME}_after_parse PARAMS ((void));
-static void gld_${EMULATION_NAME}_before_allocation PARAMS ((void));
-static asection *output_prev_sec_find
-  PARAMS ((lang_output_section_statement_type *));
-static bfd_boolean gld_${EMULATION_NAME}_place_orphan
-  PARAMS ((lang_input_statement_type *, asection *));
-static char *gld_${EMULATION_NAME}_get_script PARAMS ((int *));
-static void gld_${EMULATION_NAME}_finish PARAMS ((void));
-static bfd_boolean gld_${EMULATION_NAME}_open_dynamic_archive
-  PARAMS ((const char *, search_dirs_type *, lang_input_statement_type *));
-static void gld${EMULATION_NAME}_add_options
-  PARAMS ((int, char **, int, struct option **, int, struct option **));
-static bfd_boolean gld${EMULATION_NAME}_handle_option PARAMS ((int));
-static void gld_${EMULATION_NAME}_list_options PARAMS ((FILE *));
-static void set_pe_name PARAMS ((char *, long));
-static void set_pe_subsystem PARAMS ((void));
-static void set_pe_value PARAMS ((char *));
-static void set_pe_stack_heap PARAMS ((char *, char *));
-
-#ifdef DLL_SUPPORT
-static bfd_boolean pe_undef_cdecl_match
-  PARAMS ((struct bfd_link_hash_entry *, PTR));
-static void pe_fixup_stdcalls PARAMS ((void));
-static int make_import_fixup PARAMS ((arelent *, asection *));
-static void pe_find_data_imports PARAMS ((void));
-#endif
-
-static bfd_boolean pr_sym PARAMS ((struct bfd_hash_entry *, PTR));
-static bfd_boolean gld_${EMULATION_NAME}_unrecognized_file
-  PARAMS ((lang_input_statement_type *));
-static bfd_boolean gld_${EMULATION_NAME}_recognized_file
-  PARAMS ((lang_input_statement_type *));
-static int gld_${EMULATION_NAME}_find_potential_libraries
-  PARAMS ((char *, lang_input_statement_type *));
-
 
 static struct internal_extra_pe_aouthdr pe;
 static int dll;
@@ -159,7 +121,7 @@ static char *pe_dll_search_prefix = NULL
 extern const char *output_filename;
 
 static void
-gld_${EMULATION_NAME}_before_parse()
+gld_${EMULATION_NAME}_before_parse (void)
 {
   const bfd_arch_info_type *arch = bfd_scan_arch ("${OUTPUT_ARCH}");
   if (arch)
@@ -230,13 +192,10 @@ gld_${EMULATION_NAME}_before_parse()
 					(OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC + 1)
 
 static void
-gld${EMULATION_NAME}_add_options (ns, shortopts, nl, longopts, nrl, really_longopts)
-     int ns ATTRIBUTE_UNUSED;
-     char **shortopts ATTRIBUTE_UNUSED;
-     int nl;
-     struct option **longopts;
-     int nrl ATTRIBUTE_UNUSED;
-     struct option **really_longopts ATTRIBUTE_UNUSED;
+gld${EMULATION_NAME}_add_options
+  (int ns ATTRIBUTE_UNUSED, char **shortopts ATTRIBUTE_UNUSED, int nl,
+    struct option **longopts, int nrl ATTRIBUTE_UNUSED,
+    struct option **really_longopts ATTRIBUTE_UNUSED)
 {
   static const struct option xtra_long[] = {
     /* PE options */
@@ -336,8 +295,7 @@ static definfo init[] =
 
 
 static void
-gld_${EMULATION_NAME}_list_options (file)
-     FILE * file;
+gld_${EMULATION_NAME}_list_options (FILE *file)
 {
   fprintf (file, _("  --base_file <basefile>             Generate a base file for relocatable DLLs\n"));
   fprintf (file, _("  --dll                              Set image base to the default for DLLs\n"));
@@ -389,9 +347,7 @@ gld_${EMULATION_NAME}_list_options (file
 
 
 static void
-set_pe_name (name, val)
-     char *name;
-     long val;
+set_pe_name (char *name, long val)
 {
   int i;
 
@@ -410,7 +366,7 @@ set_pe_name (name, val)
 
 
 static void
-set_pe_subsystem ()
+set_pe_subsystem (void)
 {
   const char *sver;
   int len;
@@ -494,9 +450,7 @@ set_pe_subsystem ()
 
 
 static void
-set_pe_value (name)
-     char *name;
-
+set_pe_value (char *name)
 {
   char *end;
 
@@ -510,9 +464,7 @@ set_pe_value (name)
 
 
 static void
-set_pe_stack_heap (resname, comname)
-     char *resname;
-     char *comname;
+set_pe_stack_heap (char *resname, char *comname)
 {
   set_pe_value (resname);
 
@@ -527,8 +479,7 @@ set_pe_stack_heap (resname, comname)
 
 
 static bfd_boolean
-gld${EMULATION_NAME}_handle_option (optc)
-     int optc;
+gld${EMULATION_NAME}_handle_option (int optc)
 {
   switch (optc)
     {
@@ -536,7 +487,7 @@ gld${EMULATION_NAME}_handle_option (optc
       return FALSE;
 
     case OPTION_BASE_FILE:
-      link_info.base_file = (PTR) fopen (optarg, FOPEN_WB);
+      link_info.base_file = fopen (optarg, FOPEN_WB);
       if (link_info.base_file == NULL)
 	{
 	  /* xgettext:c-format */
@@ -697,7 +648,7 @@ compute_dll_image_base (const char *ofil
    read.  */
 
 static void
-gld_${EMULATION_NAME}_set_symbols ()
+gld_${EMULATION_NAME}_set_symbols (void)
 {
   /* Run through and invent symbols for all the
      names and insert the defaults.  */
@@ -761,7 +712,7 @@ gld_${EMULATION_NAME}_set_symbols ()
    have been read.  */
 
 static void
-gld_${EMULATION_NAME}_after_parse ()
+gld_${EMULATION_NAME}_after_parse (void)
 {
   /* The Windows libraries are designed for the linker to treat the
      entry point as an undefined symbol.  Otherwise, the .obj that
@@ -791,13 +742,12 @@ char * pe_data_import_dll;
 static struct bfd_link_hash_entry *pe_undef_found_sym;
 
 static bfd_boolean
-pe_undef_cdecl_match (h, string)
-  struct bfd_link_hash_entry *h;
-  PTR string;
+pe_undef_cdecl_match (struct bfd_link_hash_entry *h, void *inf)
 {
   int sl;
+  char *string = inf;
 
-  sl = strlen (string); /* Silence compiler warning.  */
+  sl = strlen (string);
   if (h->type == bfd_link_hash_defined
       && strncmp (h->root.string, string, sl) == 0
       && h->root.string[sl] == '@')
@@ -809,7 +759,7 @@ pe_undef_cdecl_match (h, string)
 }
 
 static void
-pe_fixup_stdcalls ()
+pe_fixup_stdcalls (void)
 {
   static int gave_warning_message = 0;
   struct bfd_link_hash_entry *undef, *sym;
@@ -858,7 +808,7 @@ pe_fixup_stdcalls ()
 	       symbols - which means scanning the whole symbol table.  */
 	    pe_undef_found_sym = 0;
 	    bfd_link_hash_traverse (link_info.hash, pe_undef_cdecl_match,
-				    (PTR) undef->root.string);
+				    (char *) undef->root.string);
 	    sym = pe_undef_found_sym;
 	    if (sym)
 	      {
@@ -883,9 +833,7 @@ pe_fixup_stdcalls ()
 }
 
 static int
-make_import_fixup (rel, s)
-  arelent *rel;
-  asection *s;
+make_import_fixup (arelent *rel, asection *s)
 {
   struct symbol_cache_entry *sym = *rel->sym_ptr_ptr;
   int addend = 0;
@@ -904,7 +852,7 @@ make_import_fixup (rel, s)
 }
 
 static void
-pe_find_data_imports ()
+pe_find_data_imports (void)
 {
   struct bfd_link_hash_entry *undef, *sym;
 
@@ -971,9 +919,7 @@ pe_find_data_imports ()
 #endif /* DLL_SUPPORT */
 
 static bfd_boolean
-pr_sym (h, string)
-  struct bfd_hash_entry *h;
-  PTR string ATTRIBUTE_UNUSED;
+pr_sym (struct bfd_hash_entry *h, void *inf ATTRIBUTE_UNUSED)
 {
   if (pe_dll_extra_pe_debug)
     printf ("+%s\n",h->string);
@@ -983,7 +929,7 @@ pr_sym (h, string)
 
 
 static void
-gld_${EMULATION_NAME}_after_open ()
+gld_${EMULATION_NAME}_after_open (void)
 {
   if (pe_dll_extra_pe_debug)
     {
@@ -1229,7 +1175,7 @@ gld_${EMULATION_NAME}_after_open ()
 }
 
 static void
-gld_${EMULATION_NAME}_before_allocation ()
+gld_${EMULATION_NAME}_before_allocation (void)
 {
 #ifdef TARGET_IS_ppcpe
   /* Here we rummage through the found bfds to collect toc information.  */
@@ -1290,8 +1236,7 @@ saw_option (char * option)
 #endif /* DLL_SUPPORT */
 
 static bfd_boolean
-gld_${EMULATION_NAME}_unrecognized_file (entry)
-     lang_input_statement_type *entry ATTRIBUTE_UNUSED;
+gld_${EMULATION_NAME}_unrecognized_file (lang_input_statement_type *entry ATTRIBUTE_UNUSED)
 {
 #ifdef DLL_SUPPORT
   const char *ext = entry->filename + strlen (entry->filename) - 4;
@@ -1380,8 +1325,7 @@ gld_${EMULATION_NAME}_unrecognized_file 
 }
 
 static bfd_boolean
-gld_${EMULATION_NAME}_recognized_file (entry)
-  lang_input_statement_type *entry ATTRIBUTE_UNUSED;
+gld_${EMULATION_NAME}_recognized_file (lang_input_statement_type *entry ATTRIBUTE_UNUSED)
 {
 #ifdef DLL_SUPPORT
 #ifdef TARGET_IS_i386pe
@@ -1414,7 +1358,7 @@ gld_${EMULATION_NAME}_recognized_file (e
 }
 
 static void
-gld_${EMULATION_NAME}_finish ()
+gld_${EMULATION_NAME}_finish (void)
 {
 #if defined(TARGET_IS_armpe) || defined(TARGET_IS_arm_epoc_pe)
   struct bfd_link_hash_entry * h;
@@ -1498,8 +1442,7 @@ gld_${EMULATION_NAME}_finish ()
    Used by place_orphan.  */
 
 static asection *
-output_prev_sec_find (os)
-     lang_output_section_statement_type *os;
+output_prev_sec_find (lang_output_section_statement_type *os)
 {
   asection *s = (asection *) NULL;
   lang_statement_union_type *u;
@@ -1541,9 +1484,7 @@ struct orphan_save
 };
 
 static bfd_boolean
-gld_${EMULATION_NAME}_place_orphan (file, s)
-     lang_input_statement_type *file;
-     asection *s;
+gld_${EMULATION_NAME}_place_orphan (lang_input_statement_type *file, asection *s)
 {
   const char *secname;
   char *hold_section_name;
@@ -1824,10 +1765,9 @@ gld_${EMULATION_NAME}_place_orphan (file
 }
 
 static bfd_boolean
-gld_${EMULATION_NAME}_open_dynamic_archive (arch, search, entry)
-     const char * arch ATTRIBUTE_UNUSED;
-     search_dirs_type * search;
-     lang_input_statement_type * entry;
+gld_${EMULATION_NAME}_open_dynamic_archive
+  (const char *arch ATTRIBUTE_UNUSED, search_dirs_type *search,
+   lang_input_statement_type *entry)
 {
   const char * filename;
   char * string;
@@ -1915,16 +1855,14 @@ gld_${EMULATION_NAME}_open_dynamic_archi
 }
 
 static int
-gld_${EMULATION_NAME}_find_potential_libraries (name, entry)
-     char * name;
-     lang_input_statement_type * entry;
+gld_${EMULATION_NAME}_find_potential_libraries
+  (char *name, lang_input_statement_type *entry)
 {
   return ldfile_open_file_search (name, entry, "", ".lib");
 }
 
 static char *
-gld_${EMULATION_NAME}_get_script (isfile)
-     int *isfile;
+gld_${EMULATION_NAME}_get_script (int *isfile)
 EOF
 # Scripts compiled in.
 # sed commands to quote an ld script as a C string.
Index: ld/emultempl/sh64elf.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/sh64elf.em,v
retrieving revision 1.4
diff -u -p -w -r1.4 sh64elf.em
--- ld/emultempl/sh64elf.em	25 Jun 2003 06:40:27 -0000	1.4
+++ ld/emultempl/sh64elf.em	27 Jun 2003 00:26:46 -0000
@@ -33,9 +33,6 @@ cat >>e${EMULATION_NAME}.c <<EOF
 #include "elf/sh.h"
 #include "elf32-sh64.h"
 
-static void sh64_elf_${EMULATION_NAME}_before_allocation PARAMS ((void));
-static void sh64_elf_${EMULATION_NAME}_after_allocation PARAMS ((void));
-
 /* Check if we need a .cranges section and create it if it's not in any
    input file.  It might seem better to always create it and if unneeded,
    discard it, but I don't find a simple way to discard it totally from
@@ -47,7 +44,7 @@ static void sh64_elf_${EMULATION_NAME}_a
    they will be linked.  */
 
 static void
-sh64_elf_${EMULATION_NAME}_before_allocation ()
+sh64_elf_${EMULATION_NAME}_before_allocation (void)
 {
   asection *cranges;
   asection *osec;
@@ -240,7 +237,7 @@ sh64_elf_${EMULATION_NAME}_before_alloca
 /* Size up and extend the .cranges section, merging generated entries.  */
 
 static void
-sh64_elf_${EMULATION_NAME}_after_allocation ()
+sh64_elf_${EMULATION_NAME}_after_allocation (void)
 {
   bfd_vma new_cranges = 0;
   bfd_vma cranges_growth = 0;
@@ -384,8 +381,7 @@ sh64_elf_${EMULATION_NAME}_after_allocat
   /* Make sure we have .cranges in memory even if there were only
      assembler-generated .cranges.  */
   cranges_growth = new_cranges * SH64_CRANGE_SIZE;
-  cranges->contents
-    = (bfd_byte *) xcalloc (cranges->_raw_size + cranges_growth, 1);
+  cranges->contents = xcalloc (cranges->_raw_size + cranges_growth, 1);
   bfd_set_section_flags (cranges->owner, cranges,
 			 bfd_get_section_flags (cranges->owner, cranges)
 			 | SEC_IN_MEMORY);
@@ -507,8 +503,7 @@ sh64_elf_${EMULATION_NAME}_after_allocat
 			     - cranges->contents);
 			cr_addr_order->size = 4;
 			cr_addr_order->u.reloc.p
-			  = ((struct bfd_link_order_reloc *)
-			     xmalloc (sizeof (struct bfd_link_order_reloc)));
+			  = xmalloc (sizeof (struct bfd_link_order_reloc));
 
 			cr_addr_order->u.reloc.p->reloc = BFD_RELOC_32;
 			cr_addr_order->u.reloc.p->u.section = osec;
@@ -540,7 +535,7 @@ sh64_elf_${EMULATION_NAME}_after_allocat
 		    bfd_put_32 (output_bfd, cr_size,
 				crangesp + SH64_CRANGE_CR_SIZE_OFFSET);
 
-		    bfd_put_16 (output_bfd, (bfd_vma) cr_type,
+		    bfd_put_16 (output_bfd, cr_type,
 				crangesp + SH64_CRANGE_CR_TYPE_OFFSET);
 
 		    last_cr_type = cr_type;
Index: ld/emultempl/sunos.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/sunos.em,v
retrieving revision 1.13
diff -u -p -w -r1.13 sunos.em
--- ld/emultempl/sunos.em	25 Jun 2003 06:40:27 -0000	1.13
+++ ld/emultempl/sunos.em	27 Jun 2003 00:26:46 -0000
@@ -61,33 +61,27 @@ Foundation, Inc., 59 Temple Place - Suit
 # endif
 #endif
 
-static void gld${EMULATION_NAME}_before_parse PARAMS ((void));
-static void gld${EMULATION_NAME}_set_symbols PARAMS ((void));
-static void gld${EMULATION_NAME}_create_output_section_statements
-  PARAMS ((void));
 static void gld${EMULATION_NAME}_find_so
-  PARAMS ((lang_input_statement_type *));
+  (lang_input_statement_type *);
 static char *gld${EMULATION_NAME}_search_dir
-  PARAMS ((const char *, const char *, bfd_boolean *));
-static void gld${EMULATION_NAME}_after_open PARAMS ((void));
+  (const char *, const char *, bfd_boolean *);
 static void gld${EMULATION_NAME}_check_needed
-  PARAMS ((lang_input_statement_type *));
+  (lang_input_statement_type *);
 static bfd_boolean gld${EMULATION_NAME}_search_needed
-  PARAMS ((const char *, const char *));
+  (const char *, const char *);
 static bfd_boolean gld${EMULATION_NAME}_try_needed
-  PARAMS ((const char *, const char *));
-static void gld${EMULATION_NAME}_before_allocation PARAMS ((void));
+  (const char *, const char *);
 static void gld${EMULATION_NAME}_find_assignment
-  PARAMS ((lang_statement_union_type *));
-static void gld${EMULATION_NAME}_find_exp_assignment PARAMS ((etree_type *));
+  (lang_statement_union_type *);
+static void gld${EMULATION_NAME}_find_exp_assignment
+  (etree_type *);
 static void gld${EMULATION_NAME}_count_need
-  PARAMS ((lang_input_statement_type *));
+  (lang_input_statement_type *);
 static void gld${EMULATION_NAME}_set_need
-  PARAMS ((lang_input_statement_type *));
-static char *gld${EMULATION_NAME}_get_script PARAMS ((int *isfile));
+  (lang_input_statement_type *);
 
 static void
-gld${EMULATION_NAME}_before_parse()
+gld${EMULATION_NAME}_before_parse (void)
 {
   const bfd_arch_info_type *arch = bfd_scan_arch ("${OUTPUT_ARCH}");
   if (arch)
@@ -108,7 +102,7 @@ gld${EMULATION_NAME}_before_parse()
    list.  */
 
 static void
-gld${EMULATION_NAME}_set_symbols ()
+gld${EMULATION_NAME}_set_symbols (void)
 {
 EOF
 if [ "x${host}" = "x${target}" ] ; then
@@ -154,7 +148,7 @@ cat >>e${EMULATION_NAME}.c <<EOF
    search it after including the .so file.  */
 
 static void
-gld${EMULATION_NAME}_create_output_section_statements ()
+gld${EMULATION_NAME}_create_output_section_statements (void)
 {
   lang_for_each_input_file (gld${EMULATION_NAME}_find_so);
 }
@@ -162,8 +156,7 @@ gld${EMULATION_NAME}_create_output_secti
 /* Search the directory for a .so file for each library search.  */
 
 static void
-gld${EMULATION_NAME}_find_so (inp)
-     lang_input_statement_type *inp;
+gld${EMULATION_NAME}_find_so (lang_input_statement_type *inp)
 {
   search_dirs_type *search;
   char *found = NULL;
@@ -234,10 +227,8 @@ gld${EMULATION_NAME}_find_so (inp)
 /* Search a directory for a .so file.  */
 
 static char *
-gld${EMULATION_NAME}_search_dir (dirname, filename, found_static)
-     const char *dirname;
-     const char *filename;
-     bfd_boolean *found_static;
+gld${EMULATION_NAME}_search_dir
+  (const char *dirname, const char *filename, bfd_boolean *found_static)
 {
   int force_maj, force_min;
   const char *dot;
@@ -378,7 +369,7 @@ static bfd_boolean global_found;
 /* This is called after all the input files have been opened.  */
 
 static void
-gld${EMULATION_NAME}_after_open ()
+gld${EMULATION_NAME}_after_open (void)
 {
   struct bfd_link_needed_list *needed, *l;
 
@@ -514,9 +505,7 @@ cat >>e${EMULATION_NAME}.c <<EOF
 /* Search for a needed file in a path.  */
 
 static bfd_boolean
-gld${EMULATION_NAME}_search_needed (path, name)
-     const char *path;
-     const char *name;
+gld${EMULATION_NAME}_search_needed (const char *path, const char *name)
 {
   const char *s;
 
@@ -559,9 +548,7 @@ gld${EMULATION_NAME}_search_needed (path
    dynamic object.  */
 
 static bfd_boolean
-gld${EMULATION_NAME}_try_needed (dir, name)
-     const char *dir;
-     const char *name;
+gld${EMULATION_NAME}_try_needed (const char *dir, const char *name)
 {
   char *file;
   char *alc;
@@ -603,8 +590,7 @@ gld${EMULATION_NAME}_try_needed (dir, na
    dynamic object more than once.  */
 
 static void
-gld${EMULATION_NAME}_check_needed (s)
-     lang_input_statement_type *s;
+gld${EMULATION_NAME}_check_needed (lang_input_statement_type *s)
 {
   if (s->filename == NULL)
     return;
@@ -679,7 +665,7 @@ static bfd_byte *need_pnames;
    sections, but before any sizes or addresses have been set.  */
 
 static void
-gld${EMULATION_NAME}_before_allocation ()
+gld${EMULATION_NAME}_before_allocation (void)
 {
   struct bfd_link_hash_entry *hdyn = NULL;
   asection *sneed;
@@ -842,8 +828,7 @@ gld${EMULATION_NAME}_before_allocation (
    symbols which are referred to by dynamic objects.  */
 
 static void
-gld${EMULATION_NAME}_find_assignment (s)
-     lang_statement_union_type *s;
+gld${EMULATION_NAME}_find_assignment (lang_statement_union_type *s)
 {
   if (s->header.type == lang_assignment_statement_enum
       && (find_assign == NULL || ! found_assign))
@@ -853,8 +838,7 @@ gld${EMULATION_NAME}_find_assignment (s)
 /* Look through an expression for an assignment statement.  */
 
 static void
-gld${EMULATION_NAME}_find_exp_assignment (exp)
-     etree_type *exp;
+gld${EMULATION_NAME}_find_exp_assignment (etree_type *exp)
 {
   switch (exp->type.node_class)
     {
@@ -902,8 +886,7 @@ gld${EMULATION_NAME}_find_exp_assignment
    for more information.  */
 
 static void
-gld${EMULATION_NAME}_count_need (inp)
-     lang_input_statement_type *inp;
+gld${EMULATION_NAME}_count_need (lang_input_statement_type *inp)
 {
   if (inp->the_bfd != NULL
       && (inp->the_bfd->flags & DYNAMIC) != 0)
@@ -924,8 +907,7 @@ gld${EMULATION_NAME}_count_need (inp)
 /* Fill in the contents of the .need section.  */
 
 static void
-gld${EMULATION_NAME}_set_need (inp)
-     lang_input_statement_type *inp;
+gld${EMULATION_NAME}_set_need (lang_input_statement_type *inp)
 {
   if (inp->the_bfd != NULL
       && (inp->the_bfd->flags & DYNAMIC) != 0)
@@ -974,8 +956,7 @@ gld${EMULATION_NAME}_set_need (inp)
 }
 
 static char *
-gld${EMULATION_NAME}_get_script(isfile)
-     int *isfile;
+gld${EMULATION_NAME}_get_script (int *isfile)
 EOF
 
 if test -n "$COMPILE_IN"
Index: ld/emultempl/ticoff.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/ticoff.em,v
retrieving revision 1.8
diff -u -p -w -r1.8 ticoff.em
--- ld/emultempl/ticoff.em	25 Jun 2003 06:40:27 -0000	1.8
+++ ld/emultempl/ticoff.em	27 Jun 2003 00:26:46 -0000
@@ -39,24 +39,14 @@ Foundation, Inc., 59 Temple Place - Suit
 
 static int coff_version;
 
-static void gld_${EMULATION_NAME}_before_parse PARAMS ((void));
-static char *gld_${EMULATION_NAME}_get_script PARAMS ((int *));
-static void gld${EMULATION_NAME}_add_options
-  PARAMS ((int, char **, int, struct option **, int, struct option **));
-static bfd_boolean gld${EMULATION_NAME}_handle_option PARAMS ((int));
-static void gld_${EMULATION_NAME}_list_options PARAMS ((FILE *));
-
 /* TI COFF extra command line options */
 #define OPTION_COFF_FORMAT		(300 + 1)
 
 static void
-gld${EMULATION_NAME}_add_options (ns, shortopts, nl, longopts, nrl, really_longopts)
-     int ns ATTRIBUTE_UNUSED;
-     char **shortopts ATTRIBUTE_UNUSED;
-     int nl;
-     struct option **longopts;
-     int nrl ATTRIBUTE_UNUSED;
-     struct option **really_longopts ATTRIBUTE_UNUSED;
+gld${EMULATION_NAME}_add_options
+  (int ns ATTRIBUTE_UNUSED, char **shortopts ATTRIBUTE_UNUSED, int nl,
+   struct option **longopts, int nrl ATTRIBUTE_UNUSED,
+   struct option **really_longopts ATTRIBUTE_UNUSED)
 {
   static const struct option xtra_long[] = {
     /* TI COFF options */
@@ -70,15 +60,13 @@ gld${EMULATION_NAME}_add_options (ns, sh
 }
 
 static void
-gld_${EMULATION_NAME}_list_options (file)
-    FILE * file;
+gld_${EMULATION_NAME}_list_options (FILE * file)
 {
   fprintf (file, _("  --format 0|1|2         Specify which COFF version to use"));
 }				  
 
 static bfd_boolean
-gld${EMULATION_NAME}_handle_option (optc)
-     int optc;
+gld${EMULATION_NAME}_handle_option (int optc)
 {
   switch (optc)
     {
@@ -106,7 +94,7 @@ gld${EMULATION_NAME}_handle_option (optc
 }
 
 static void
-gld_${EMULATION_NAME}_before_parse()
+gld_${EMULATION_NAME}_before_parse(void)
 {
 #ifndef TARGET_			/* I.e., if not generic.  */
   ldfile_set_output_arch ("`echo ${ARCH}`");
@@ -114,8 +102,7 @@ gld_${EMULATION_NAME}_before_parse()
 }
 
 static char *
-gld_${EMULATION_NAME}_get_script (isfile)
-     int *isfile;
+gld_${EMULATION_NAME}_get_script (int *isfile)
 EOF
 if test -n "$COMPILE_IN"
 then
Index: ld/emultempl/vanilla.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/vanilla.em,v
retrieving revision 1.8
diff -u -p -w -r1.8 vanilla.em
--- ld/emultempl/vanilla.em	28 Feb 2003 01:32:31 -0000	1.8
+++ ld/emultempl/vanilla.em	27 Jun 2003 00:26:47 -0000
@@ -35,17 +35,12 @@ Foundation, Inc., 59 Temple Place - Suit
 #include "ldfile.h"
 #include "ldemul.h"
 
-static void vanilla_before_parse PARAMS ((void));
-static void vanilla_set_output_arch PARAMS ((void));
-static char *vanilla_get_script PARAMS ((int *));
-
-
-static void vanilla_before_parse()
+static void vanilla_before_parse (void)
 {
 }
 
 static void
-vanilla_set_output_arch()
+vanilla_set_output_arch (void)
 {
   /* Set the output architecture and machine if possible */
   unsigned long  machine = 0;
@@ -53,8 +48,7 @@ vanilla_set_output_arch()
 }
 
 static char *
-vanilla_get_script(isfile)
-     int *isfile;
+vanilla_get_script (int *isfile)
 {
   *isfile = 0;
   return "";
Index: ld/emultempl/xtensaelf.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/xtensaelf.em,v
retrieving revision 1.2
diff -u -p -w -r1.2 xtensaelf.em
--- ld/emultempl/xtensaelf.em	25 Jun 2003 06:40:27 -0000	1.2
+++ ld/emultempl/xtensaelf.em	27 Jun 2003 00:26:47 -0000
@@ -26,22 +26,8 @@ cat >>e${EMULATION_NAME}.c <<EOF
 
 #include <xtensa-config.h>
 
-static char *elf_xtensa_choose_target
-  PARAMS ((int, char **));
-static bfd_boolean elf_xtensa_place_orphan
-  PARAMS ((lang_input_statement_type *, asection *));
-static void elf_xtensa_before_parse
-  PARAMS ((void));
-static void elf_xtensa_before_allocation
-  PARAMS ((void));
-static void xtensa_wild_group_interleave
-  PARAMS ((lang_statement_union_type *));
-static void xtensa_wild_group_interleave_callback
-  PARAMS ((lang_statement_union_type *));
-static void xtensa_colocate_output_literals
-  PARAMS ((lang_statement_union_type *));
-static void xtensa_colocate_output_literals_callback
-  PARAMS ((lang_statement_union_type *));
+static void xtensa_wild_group_interleave (lang_statement_union_type *);
+static void xtensa_colocate_output_literals (lang_statement_union_type *);
 
 
 /* Flag for the emulation-specific "--no-relax" option.  */
@@ -58,9 +44,8 @@ static bfd_boolean xtensa_use_literal_pa
 
 
 static char *
-elf_xtensa_choose_target (argc, argv)
-     int argc ATTRIBUTE_UNUSED;
-     char **argv ATTRIBUTE_UNUSED;
+elf_xtensa_choose_target (int argc ATTRIBUTE_UNUSED,
+			  char **argv ATTRIBUTE_UNUSED)
 {
   if (XCHAL_HAVE_BE)
     return "${BIG_OUTPUT_FORMAT}";
@@ -70,9 +55,7 @@ elf_xtensa_choose_target (argc, argv)
 
 
 static bfd_boolean
-elf_xtensa_place_orphan (file, s)
-     lang_input_statement_type *file;
-     asection *s;
+elf_xtensa_place_orphan (lang_input_statement_type *file, asection *s)
 {
   /* Early exit for relocatable links.  */
   if (link_info.relocatable)
@@ -83,7 +66,7 @@ elf_xtensa_place_orphan (file, s)
 
 
 static void
-elf_xtensa_before_parse ()
+elf_xtensa_before_parse (void)
 {
   /* Just call the default hook.... Tensilica's version of this function
      does some other work that isn't relevant here.  */
@@ -94,8 +77,8 @@ elf_xtensa_before_parse ()
 /* This is called after the sections have been attached to output
    sections, but before any sizes or addresses have been set.  */
 
-void
-elf_xtensa_before_allocation ()
+static void
+elf_xtensa_before_allocation (void)
 {
   bfd *in_bfd;
   bfd_boolean is_big_endian = XCHAL_HAVE_BE;
@@ -184,64 +167,29 @@ struct reloc_deps_graph_t
 };
 
 static void xtensa_layout_wild
-  PARAMS ((const reloc_deps_graph *, lang_wild_statement_type *));
+  (const reloc_deps_graph *, lang_wild_statement_type *);
 
-typedef void (*deps_callback_t)
-  PARAMS ((asection *, /* src_sec */
+typedef void (*deps_callback_t) (asection *, /* src_sec */
 	   bfd_vma,    /* src_offset */
 	   asection *, /* target_sec */
 	   bfd_vma,    /* target_offset */
-	   PTR));      /* closure */
+				 void *);    /* closure */
 
-static void build_deps_graph_callback
-  PARAMS ((asection *, bfd_vma, asection *, bfd_vma, PTR));
 extern bfd_boolean xtensa_callback_required_dependence
-  PARAMS ((bfd *, asection *, struct bfd_link_info *,
-	   deps_callback_t, PTR));
+  (bfd *, asection *, struct bfd_link_info *, deps_callback_t, void *);
 static void xtensa_ldlang_clear_addresses
-  PARAMS ((lang_statement_union_type *));
+  (lang_statement_union_type *);
 static bfd_boolean ld_local_file_relocations_fit
-  PARAMS ((lang_statement_union_type *, const reloc_deps_graph *));
+  (lang_statement_union_type *, const reloc_deps_graph *);
 static bfd_vma ld_assign_relative_paged_dot
-  PARAMS ((bfd_vma, lang_statement_union_type *,
-	   const reloc_deps_graph *, bfd_boolean)); 
+  (bfd_vma, lang_statement_union_type *, const reloc_deps_graph *,
+   bfd_boolean);
 static bfd_vma ld_xtensa_insert_page_offsets
-  PARAMS ((bfd_vma, lang_statement_union_type *, reloc_deps_graph *,
-	   bfd_boolean));
-static void lang_for_each_statement_worker
-  PARAMS ((void (*) (lang_statement_union_type *),
-	   lang_statement_union_type *));
-static void xtensa_move_dependencies_to_front
-  PARAMS ((reloc_deps_graph *, lang_wild_statement_type *));
-static reloc_deps_graph *ld_build_required_section_dependence
-  PARAMS ((lang_statement_union_type *));
-static bfd_boolean section_is_source
-  PARAMS ((const reloc_deps_graph *, lang_statement_union_type *));
-static bfd_boolean section_is_target
-  PARAMS ((const reloc_deps_graph *, lang_statement_union_type *));
-static bfd_boolean section_is_source_or_target
-  PARAMS ((const reloc_deps_graph *, lang_statement_union_type *));
-static bfd_boolean deps_has_sec_edge
-  PARAMS ((const reloc_deps_graph *, asection *, asection *));
-static bfd_boolean deps_has_edge
-  PARAMS ((const reloc_deps_graph *, lang_statement_union_type *,
-	   lang_statement_union_type *));
-static void add_deps_edge
-  PARAMS ((reloc_deps_graph *, asection *, asection *));
+  (bfd_vma, lang_statement_union_type *, reloc_deps_graph *, bfd_boolean);
 #if EXTRA_VALIDATION
 static size_t ld_count_children
-  PARAMS ((lang_statement_union_type *));
+  (lang_statement_union_type *);
 #endif
-static void free_reloc_deps_graph
-  PARAMS ((reloc_deps_graph *));
-static void xtensa_colocate_literals
-  PARAMS ((reloc_deps_graph *, lang_statement_union_type *));
-static reloc_deps_section *xtensa_get_section_deps
-  PARAMS ((const reloc_deps_graph *, asection *));
-static void xtensa_set_section_deps
-  PARAMS ((const reloc_deps_graph *, asection *, reloc_deps_section *));
-static void xtensa_append_section_deps
-  PARAMS ((reloc_deps_graph *, asection *));
 
 extern lang_statement_list_type constructor_list;
 
@@ -250,9 +198,8 @@ extern lang_statement_list_type construc
     there statically.  */
 
 static void
-lang_for_each_statement_worker (func, s)
-     void (*func) PARAMS ((lang_statement_union_type *));
-     lang_statement_union_type *s;
+lang_for_each_statement_worker (void (*func) (lang_statement_union_type *),
+				lang_statement_union_type *s)
 {
   for (; s != (lang_statement_union_type *) NULL; s = s->header.next)
     {
@@ -299,26 +246,24 @@ lang_for_each_statement_worker (func, s)
 /* End of verbatim code from ldlang.c.  */
 
 
-reloc_deps_section *
-xtensa_get_section_deps (deps, sec)
-     const reloc_deps_graph *deps ATTRIBUTE_UNUSED;
-     asection *sec;
+static reloc_deps_section *
+xtensa_get_section_deps (const reloc_deps_graph *deps ATTRIBUTE_UNUSED,
+			 asection *sec)
 {
   /* We have a separate function for this so that
      we could in the future keep a completely independent
      structure that maps a section to its dependence edges.
      For now, we place these in the sec->userdata field.  */
-  reloc_deps_section *sec_deps = (reloc_deps_section *) sec->userdata;
+  reloc_deps_section *sec_deps = sec->userdata;
   return sec_deps;
 }
 
-void
-xtensa_set_section_deps (deps, sec, deps_section)
-     const reloc_deps_graph *deps ATTRIBUTE_UNUSED;
-     asection *sec;
-     reloc_deps_section *deps_section;
+static void
+xtensa_set_section_deps (const reloc_deps_graph *deps ATTRIBUTE_UNUSED,
+			 asection *sec,
+			 reloc_deps_section *deps_section)
 {
-  sec->userdata = (void *) deps_section;
+  sec->userdata = deps_section;
 }
 
 
@@ -326,9 +271,7 @@ xtensa_set_section_deps (deps, sec, deps
    the graph so we can clean them up quickly.  */
 
 static void 
-xtensa_append_section_deps (deps, sec)
-     reloc_deps_graph *deps;
-     asection *sec;
+xtensa_append_section_deps (reloc_deps_graph *deps, asection *sec)
 {
   if (deps->size <= deps->count)
     {
@@ -340,7 +283,7 @@ xtensa_append_section_deps (deps, sec)
       if (new_size == 0)
 	new_size = 20;
       
-      new_sections = (asection**) xmalloc (sizeof (asection*) * new_size);
+      new_sections = xmalloc (sizeof (asection *) * new_size);
       memset (new_sections, 0, sizeof (asection*) * new_size);
       for (i = 0; i < deps->count; i++) 
 	{
@@ -357,8 +300,7 @@ xtensa_append_section_deps (deps, sec)
 
 
 static void 
-free_reloc_deps_graph (deps)
-     reloc_deps_graph *deps;
+free_reloc_deps_graph (reloc_deps_graph *deps)
 {
   size_t i;
   for (i = 0; i < deps->count; i++)
@@ -393,10 +335,9 @@ free_reloc_deps_graph (deps)
 }
 
 
-bfd_boolean
-section_is_source (deps, s)
-     const reloc_deps_graph *deps ATTRIBUTE_UNUSED;
-     lang_statement_union_type *s;
+static bfd_boolean
+section_is_source (const reloc_deps_graph *deps ATTRIBUTE_UNUSED,
+		   lang_statement_union_type *s)
 {
   asection *sec;
   const reloc_deps_section *sec_deps;
@@ -406,14 +347,13 @@ section_is_source (deps, s)
   sec = s->input_section.section;
 
   sec_deps = xtensa_get_section_deps (deps, sec);
-  return (sec_deps && sec_deps->succs != NULL);
+  return sec_deps && sec_deps->succs != NULL;
 }
 
 
-bfd_boolean
-section_is_target (deps, s)
-     const reloc_deps_graph *deps ATTRIBUTE_UNUSED;
-     lang_statement_union_type *s;
+static bfd_boolean
+section_is_target (const reloc_deps_graph *deps ATTRIBUTE_UNUSED,
+		   lang_statement_union_type *s)
 {
   asection *sec;
   const reloc_deps_section *sec_deps;
@@ -423,13 +363,12 @@ section_is_target (deps, s)
   sec = s->input_section.section;
 
   sec_deps = xtensa_get_section_deps (deps, sec);
-  return (sec_deps && sec_deps->preds != NULL);
+  return sec_deps && sec_deps->preds != NULL;
 }
 
-bfd_boolean
-section_is_source_or_target (deps, s)
-     const reloc_deps_graph *deps ATTRIBUTE_UNUSED;
-     lang_statement_union_type *s;
+static bfd_boolean
+section_is_source_or_target (const reloc_deps_graph *deps ATTRIBUTE_UNUSED,
+			     lang_statement_union_type *s)
 {
   return (section_is_source (deps, s)
 	  || section_is_target (deps, s));
@@ -454,14 +393,9 @@ struct xtensa_ld_iter_stack_t
   xtensa_ld_iter_stack *prev;		/* Back pointer for stack.  */
 };
 
-static void ld_xtensa_move_section_after
-  PARAMS ((xtensa_ld_iter *, xtensa_ld_iter *));
 
-
-void 
-ld_xtensa_move_section_after (to, current)
-     xtensa_ld_iter *to;
-     xtensa_ld_iter *current;
+static void
+ld_xtensa_move_section_after (xtensa_ld_iter *to, xtensa_ld_iter *current)
 {
   lang_statement_union_type *to_next;
   lang_statement_union_type *current_next;
@@ -511,36 +445,16 @@ ld_xtensa_move_section_after (to, curren
 /* Can only be called with lang_statements that have lists.  Returns
    false if the list is empty.  */
 
-static bfd_boolean iter_stack_empty
-  PARAMS ((xtensa_ld_iter_stack **));
-static bfd_boolean iter_stack_push
-  PARAMS ((xtensa_ld_iter_stack **, lang_statement_union_type *));
-static void iter_stack_pop
-  PARAMS ((xtensa_ld_iter_stack **));
-static void iter_stack_update
-  PARAMS ((xtensa_ld_iter_stack **));
-static void iter_stack_next
-  PARAMS ((xtensa_ld_iter_stack **));
-static lang_statement_union_type *iter_stack_current
-  PARAMS ((xtensa_ld_iter_stack **));
-static void iter_stack_create
-  PARAMS ((xtensa_ld_iter_stack **, lang_statement_union_type *));
-static void iter_stack_copy_current
-  PARAMS ((xtensa_ld_iter_stack **, xtensa_ld_iter *));
-
-
 static bfd_boolean 
-iter_stack_empty (stack_p)
-     xtensa_ld_iter_stack **stack_p;
+iter_stack_empty (xtensa_ld_iter_stack **stack_p)
 {
-  return (*stack_p == NULL);
+  return *stack_p == NULL;
 }
 
 
 static bfd_boolean
-iter_stack_push (stack_p, parent)
-     xtensa_ld_iter_stack **stack_p;
-     lang_statement_union_type *parent;
+iter_stack_push (xtensa_ld_iter_stack **stack_p,
+		 lang_statement_union_type *parent)
 {
   xtensa_ld_iter_stack *stack;
   lang_statement_list_type *l = NULL;
@@ -565,7 +479,7 @@ iter_stack_push (stack_p, parent)
   if (l->tail == &l->head) 
     return FALSE;
 
-  stack = (xtensa_ld_iter_stack *) xmalloc (sizeof (xtensa_ld_iter_stack));
+  stack = xmalloc (sizeof (xtensa_ld_iter_stack));
   memset (stack, 0, sizeof (xtensa_ld_iter_stack));
   stack->iterloc.parent = parent;
   stack->iterloc.l = l;
@@ -581,8 +495,7 @@ iter_stack_push (stack_p, parent)
 
 
 static void 
-iter_stack_pop (stack_p)
-     xtensa_ld_iter_stack **stack_p;
+iter_stack_pop (xtensa_ld_iter_stack **stack_p)
 {
   xtensa_ld_iter_stack *stack;
 
@@ -607,8 +520,7 @@ iter_stack_pop (stack_p)
    accordingly.  */
 
 static void
-iter_stack_update (stack_p)
-     xtensa_ld_iter_stack **stack_p;
+iter_stack_update (xtensa_ld_iter_stack **stack_p)
 {
   if (!iter_stack_empty (stack_p)
       && (*(*stack_p)->iterloc.loc) == NULL) 
@@ -627,8 +539,7 @@ iter_stack_update (stack_p)
 
 
 static void 
-iter_stack_next (stack_p)
-     xtensa_ld_iter_stack **stack_p;
+iter_stack_next (xtensa_ld_iter_stack **stack_p)
 {
   xtensa_ld_iter_stack *stack;
   lang_statement_union_type *current;
@@ -664,8 +575,7 @@ iter_stack_next (stack_p)
 
 
 static lang_statement_union_type *
-iter_stack_current (stack_p)
-     xtensa_ld_iter_stack **stack_p;
+iter_stack_current (xtensa_ld_iter_stack **stack_p)
 {
   return *((*stack_p)->iterloc.loc);
 }
@@ -674,27 +584,24 @@ iter_stack_current (stack_p)
 /* The iter stack is a preorder.  */
 
 static void 
-iter_stack_create (stack_p, parent)
-     xtensa_ld_iter_stack **stack_p;
-     lang_statement_union_type *parent;
+iter_stack_create (xtensa_ld_iter_stack **stack_p,
+		   lang_statement_union_type *parent)
 {
   iter_stack_push (stack_p, parent);
 }
 
 
 static void 
-iter_stack_copy_current (stack_p, front)
-     xtensa_ld_iter_stack **stack_p;
-     xtensa_ld_iter *front;
+iter_stack_copy_current (xtensa_ld_iter_stack **stack_p,
+			 xtensa_ld_iter *front)
 {
   *front = (*stack_p)->iterloc;
 }
 
 
-void
-xtensa_colocate_literals (deps, statement)
-     reloc_deps_graph *deps;
-     lang_statement_union_type *statement;
+static void
+xtensa_colocate_literals (reloc_deps_graph *deps,
+			  lang_statement_union_type *statement)
 {
   /* Keep a stack of pointers to control iteration through the contours.  */
   xtensa_ld_iter_stack *stack = NULL;
@@ -806,10 +713,9 @@ xtensa_colocate_literals (deps, statemen
 }
 
 
-void
-xtensa_move_dependencies_to_front (deps, w)
-     reloc_deps_graph *deps;
-     lang_wild_statement_type *w;
+static void
+xtensa_move_dependencies_to_front (reloc_deps_graph *deps,
+				   lang_wild_statement_type *w)
 {
   /* Keep a front pointer and a current pointer.  */
   lang_statement_union_type **front;
@@ -853,10 +759,9 @@ xtensa_move_dependencies_to_front (deps,
 
 
 static bfd_boolean
-deps_has_sec_edge (deps, src, tgt)
-     const reloc_deps_graph *deps;
-     asection *src;
-     asection *tgt;
+deps_has_sec_edge (const reloc_deps_graph *deps,
+		   asection *src,
+		   asection *tgt)
 {
   const reloc_deps_section *sec_deps;
   const reloc_deps_e *sec_deps_e;
@@ -878,10 +783,9 @@ deps_has_sec_edge (deps, src, tgt)
 
 
 static bfd_boolean
-deps_has_edge (deps, src, tgt)
-     const reloc_deps_graph *deps;
-     lang_statement_union_type *src;
-     lang_statement_union_type *tgt;
+deps_has_edge (const reloc_deps_graph *deps,
+	       lang_statement_union_type *src,
+	       lang_statement_union_type *tgt)
 {
   if (!section_is_source (deps, src))
     return FALSE;
@@ -899,10 +803,9 @@ deps_has_edge (deps, src, tgt)
 
 
 static void
-add_deps_edge (deps, src_sec, tgt_sec)
-     reloc_deps_graph *deps;
-     asection *src_sec;
-     asection *tgt_sec;
+add_deps_edge (reloc_deps_graph *deps,
+	       asection *src_sec,
+	       asection *tgt_sec)
 {
   reloc_deps_section *src_sec_deps;
   reloc_deps_section *tgt_sec_deps;
@@ -917,8 +820,7 @@ add_deps_edge (deps, src_sec, tgt_sec)
   if (src_sec_deps == NULL)
     {
       /* Add a section.  */
-      src_sec_deps = (reloc_deps_section *)
-	xmalloc (sizeof (reloc_deps_section));
+      src_sec_deps = xmalloc (sizeof (reloc_deps_section));
       memset (src_sec_deps, 0, sizeof (reloc_deps_section));
       src_sec_deps->is_only_literal = 0;
       src_sec_deps->preds = NULL;
@@ -931,8 +833,7 @@ add_deps_edge (deps, src_sec, tgt_sec)
   if (tgt_sec_deps == NULL)
     {
       /* Add a section.  */
-      tgt_sec_deps = (reloc_deps_section *)
-	xmalloc (sizeof (reloc_deps_section));
+      tgt_sec_deps = xmalloc (sizeof (reloc_deps_section));
       memset (tgt_sec_deps, 0, sizeof (reloc_deps_section));
       tgt_sec_deps->is_only_literal = 0;
       tgt_sec_deps->preds = NULL;
@@ -942,14 +843,14 @@ add_deps_edge (deps, src_sec, tgt_sec)
     }
 
   /* Add the edges.  */
-  src_edge = (reloc_deps_e *) xmalloc (sizeof (reloc_deps_e));
+  src_edge = xmalloc (sizeof (reloc_deps_e));
   memset (src_edge, 0, sizeof (reloc_deps_e));
   src_edge->src = src_sec;
   src_edge->tgt = tgt_sec;
   src_edge->next = src_sec_deps->succs;
   src_sec_deps->succs = src_edge;
 
-  tgt_edge = (reloc_deps_e *) xmalloc (sizeof (reloc_deps_e));
+  tgt_edge = xmalloc (sizeof (reloc_deps_e));
   memset (tgt_edge, 0, sizeof (reloc_deps_e));
   tgt_edge->src = src_sec;
   tgt_edge->tgt = tgt_sec;
@@ -958,17 +859,14 @@ add_deps_edge (deps, src_sec, tgt_sec)
 }
 
 
-void 
-build_deps_graph_callback (src_sec, src_offset, 
-			  target_sec, target_offset, closure)
-     asection *src_sec;
-     bfd_vma src_offset ATTRIBUTE_UNUSED;
-     asection *target_sec;
-     bfd_vma target_offset ATTRIBUTE_UNUSED;
-     PTR closure;
+static void
+build_deps_graph_callback (asection *src_sec,
+			   bfd_vma src_offset ATTRIBUTE_UNUSED,
+			   asection *target_sec,
+			   bfd_vma target_offset ATTRIBUTE_UNUSED,
+			   void *closure)
 {
-  reloc_deps_graph *deps;
-  deps = (reloc_deps_graph*) closure;
+  reloc_deps_graph *deps = closure;
 
   /* If the target is defined.  */
   if (target_sec != NULL)
@@ -976,14 +874,13 @@ build_deps_graph_callback (src_sec, src_
 }
 
 
-reloc_deps_graph *
-ld_build_required_section_dependence (s)
-     lang_statement_union_type *s;
+static reloc_deps_graph *
+ld_build_required_section_dependence (lang_statement_union_type *s)
 {
   reloc_deps_graph *deps;
   xtensa_ld_iter_stack *stack = NULL;
 
-  deps = (reloc_deps_graph*) xmalloc (sizeof (reloc_deps_graph));
+  deps = xmalloc (sizeof (reloc_deps_graph));
   deps->sections = NULL;
   deps->count = 0;
   deps->size = 0;
@@ -1003,7 +900,7 @@ ld_build_required_section_dependence (s)
 					       &link_info,
 					       /* Use the same closure.  */
 					       build_deps_graph_callback,
-					       (PTR) deps);
+					       deps);
 	}
     }
   return deps;
@@ -1011,9 +908,8 @@ ld_build_required_section_dependence (s)
 
 
 #if EXTRA_VALIDATION
-size_t
-ld_count_children (s)
-     lang_statement_union_type *s;
+static size_t
+ld_count_children (lang_statement_union_type *s)
 {
   size_t count = 0;
   xtensa_ld_iter_stack *stack = NULL;
@@ -1030,9 +926,8 @@ ld_count_children (s)
 #endif /* EXTRA_VALIDATION */
 
 
-void
-xtensa_wild_group_interleave_callback (statement)
-     lang_statement_union_type * statement;
+static void
+xtensa_wild_group_interleave_callback (lang_statement_union_type *statement)
 {
   lang_wild_statement_type *w;
   reloc_deps_graph *deps;
@@ -1124,18 +1019,16 @@ xtensa_wild_group_interleave_callback (s
 }
 
 
-void 
-xtensa_wild_group_interleave (s)
-     lang_statement_union_type *s; 
+static void
+xtensa_wild_group_interleave (lang_statement_union_type *s)
 {
   lang_for_each_statement_worker (xtensa_wild_group_interleave_callback, s);
 }
 
 
-void 
-xtensa_layout_wild (deps, w)
-     const reloc_deps_graph *deps;
-     lang_wild_statement_type *w;
+static void
+xtensa_layout_wild (const reloc_deps_graph *deps,
+		    lang_wild_statement_type *w)
 {
   /* If it does not fit initially, we need to do this step.  Move all
      of the wild literal sections to a new list, then move each of
@@ -1238,9 +1131,8 @@ xtensa_layout_wild (deps, w)
 }
 
 
-void
-xtensa_colocate_output_literals_callback (statement)
-     lang_statement_union_type * statement;
+static void
+xtensa_colocate_output_literals_callback (lang_statement_union_type *statement)
 {
   lang_output_section_statement_type *os;
   reloc_deps_graph *deps;
@@ -1290,7 +1182,7 @@ xtensa_colocate_output_literals_callback
       /* Insert align/offset assignment statement.  */
       if (xtensa_use_literal_pages)
 	{
-	  ld_xtensa_insert_page_offsets ((bfd_vma) 0, statement, deps,
+	  ld_xtensa_insert_page_offsets (0, statement, deps,
 					 xtensa_use_literal_pages);
 	  lang_for_each_statement_worker (xtensa_ldlang_clear_addresses,
 					  statement);
@@ -1302,17 +1194,15 @@ xtensa_colocate_output_literals_callback
 }
 
 
-void 
-xtensa_colocate_output_literals (s)
-     lang_statement_union_type *s; 
+static void
+xtensa_colocate_output_literals (lang_statement_union_type *s)
 {
   lang_for_each_statement_worker (xtensa_colocate_output_literals_callback, s);
 }
 
 
-void
-xtensa_ldlang_clear_addresses (statement)
-     lang_statement_union_type * statement;
+static void
+xtensa_ldlang_clear_addresses (lang_statement_union_type *statement)
 {
   switch (statement->header.type)
     {
@@ -1328,12 +1218,11 @@ xtensa_ldlang_clear_addresses (statement
 }
 
 
-bfd_vma
-ld_assign_relative_paged_dot (dot, s, deps, lit_align)
-     bfd_vma dot;
-     lang_statement_union_type *s;
-     const reloc_deps_graph *deps ATTRIBUTE_UNUSED;
-     bfd_boolean lit_align;
+static bfd_vma
+ld_assign_relative_paged_dot (bfd_vma dot,
+			      lang_statement_union_type *s,
+			      const reloc_deps_graph *deps ATTRIBUTE_UNUSED,
+			      bfd_boolean lit_align)
 {
   /* Walk through all of the input statements in this wild statement
      assign dot to all of them.  */
@@ -1397,10 +1286,9 @@ ld_assign_relative_paged_dot (dot, s, de
 }
 
 
-bfd_boolean
-ld_local_file_relocations_fit (statement, deps)
-     lang_statement_union_type *statement;
-     const reloc_deps_graph *deps ATTRIBUTE_UNUSED;
+static bfd_boolean
+ld_local_file_relocations_fit (lang_statement_union_type *statement,
+			       const reloc_deps_graph *deps ATTRIBUTE_UNUSED)
 {
   /* Walk over all of the dependencies that we identified and make
      sure that IF the source and target are here (addr != 0):
@@ -1442,14 +1330,14 @@ ld_local_file_relocations_fit (statement
 	  /* We choose to walk through the successors.  */
 	  for (e = deps_section->succs; e != NULL; e = e->next)
 	    {
-	      if ((e->src != e->tgt)
+	      if (e->src != e->tgt
 		  && e->src->output_section == e->tgt->output_section
 		  && e->src->output_offset != 0
 		  && e->tgt->output_offset != 0)
 		{
 		  bfd_vma l32r_addr = 
 		    align_power (e->src->output_offset + e->src->_raw_size, 2);
-		  bfd_vma target_addr = e->tgt->output_offset & (~3);
+		  bfd_vma target_addr = e->tgt->output_offset & ~3;
 		  if (l32r_addr < target_addr)
 		    {
 		      fprintf (stderr, "Warning: "
@@ -1457,7 +1345,7 @@ ld_local_file_relocations_fit (statement
 		      return FALSE;
 		    }
 
-		  if ((l32r_addr - target_addr) > (256*1024 - align_penalty)) 
+		  if (l32r_addr - target_addr > 256 * 1024 - align_penalty)
 		    return FALSE;
 		}
 	    }
@@ -1468,12 +1356,11 @@ ld_local_file_relocations_fit (statement
 }
 
 
-bfd_vma
-ld_xtensa_insert_page_offsets (dot, s, deps, lit_align)
-     bfd_vma dot;
-     lang_statement_union_type *s;
-     reloc_deps_graph *deps;
-     bfd_boolean lit_align;
+static bfd_vma
+ld_xtensa_insert_page_offsets (bfd_vma dot,
+			       lang_statement_union_type *s,
+			       reloc_deps_graph *deps,
+			       bfd_boolean lit_align)
 {
   xtensa_ld_iter_stack *stack = NULL;
   xtensa_ld_iter_stack **stack_p = &stack;

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre



More information about the Binutils mailing list