* emultempl/aix.em: Convert to C90, remove unnecessary prototypes
[deliverable/binutils-gdb.git] / ld / emultempl / mipsecoff.em
index 9fda644eaa0a27381d5d441dede6c6bd767422b7..c0e8093ef7ec1c940c5ce7cee0fa67a0d053f6e2 100644 (file)
@@ -1,6 +1,6 @@
 # This shell script emits a C file. -*- C -*-
 # It does some substitutions.
-if [ -z "$MACHINE" ]; then 
+if [ -z "$MACHINE" ]; then
   OUTPUT_ARCH=${ARCH}
 else
   OUTPUT_ARCH=${ARCH}:${MACHINE}
@@ -9,7 +9,8 @@ cat >e${EMULATION_NAME}.c <<EOF
 /* This file is is generated by a shell script.  DO NOT EDIT! */
 
 /* Handle embedded relocs for MIPS.
-   Copyright 1994, 1995, 1997, 2000, 2002 Free Software Foundation, Inc.
+   Copyright 1994, 1995, 1997, 2000, 2002, 2003
+   Free Software Foundation, Inc.
    Written by Ian Lance Taylor <ian@cygnus.com> based on generic.em.
 
 This file is part of GLD, the Gnu Linker.
@@ -43,14 +44,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #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}");
@@ -73,12 +70,12 @@ 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;
 
   if (! command_line.embedded_relocs
-      || link_info.relocateable)
+      || link_info.relocatable)
     return;
 
   for (abfd = link_info.input_bfds; abfd != NULL; abfd = abfd->link_next)
@@ -118,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);
     }
 }
 
@@ -126,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));
@@ -143,12 +137,12 @@ 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;
 
   if (! command_line.embedded_relocs
-      || link_info.relocateable)
+      || link_info.relocatable)
     return;
 
   for (abfd = link_info.input_bfds; abfd != NULL; abfd = abfd->link_next)
@@ -179,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"
@@ -191,14 +184,14 @@ then
 sc="-f stringify.sed"
 
 cat >>e${EMULATION_NAME}.c <<EOF
-{                           
+{
   *isfile = 0;
 
-  if (link_info.relocateable && config.build_constructors)
+  if (link_info.relocatable && config.build_constructors)
     return
 EOF
 sed $sc ldscripts/${EMULATION_NAME}.xu                 >> e${EMULATION_NAME}.c
-echo '  ; else if (link_info.relocateable) return'     >> e${EMULATION_NAME}.c
+echo '  ; else if (link_info.relocatable) return'     >> e${EMULATION_NAME}.c
 sed $sc ldscripts/${EMULATION_NAME}.xr                 >> e${EMULATION_NAME}.c
 echo '  ; else if (!config.text_read_only) return'     >> e${EMULATION_NAME}.c
 sed $sc ldscripts/${EMULATION_NAME}.xbn                >> e${EMULATION_NAME}.c
@@ -212,12 +205,12 @@ else
 # Scripts read from the filesystem.
 
 cat >>e${EMULATION_NAME}.c <<EOF
-{                           
+{
   *isfile = 1;
 
-  if (link_info.relocateable && config.build_constructors)
+  if (link_info.relocatable && config.build_constructors)
     return "ldscripts/${EMULATION_NAME}.xu";
-  else if (link_info.relocateable)
+  else if (link_info.relocatable)
     return "ldscripts/${EMULATION_NAME}.xr";
   else if (!config.text_read_only)
     return "ldscripts/${EMULATION_NAME}.xbn";
@@ -232,7 +225,7 @@ fi
 
 cat >>e${EMULATION_NAME}.c <<EOF
 
-struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation = 
+struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
 {
   gld${EMULATION_NAME}_before_parse,
   syslib_default,
@@ -252,6 +245,8 @@ struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
   NULL,        /* place orphan */
   NULL,        /* set symbols */
   NULL,        /* parse args */
+  NULL,        /* add_options */
+  NULL,        /* handle_option */
   NULL,        /* unrecognized file */
   NULL,        /* list options */
   NULL,        /* recognized file */
This page took 0.026721 seconds and 4 git commands to generate.