aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl/mipsecoff.em
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2003-06-27 00:38:25 +0000
committerAlan Modra <amodra@gmail.com>2003-06-27 00:38:25 +0000
commit0c7a8e5acd399d1d36dbe0cda815844dd5308c10 (patch)
tree1b0c74e9719dfd6d6b6b1b396373870147643680 /ld/emultempl/mipsecoff.em
parenta9232bb2657c979e51dd77e8d823cd90c749e784 (diff)
downloadfsf-binutils-gdb-0c7a8e5acd399d1d36dbe0cda815844dd5308c10.zip
fsf-binutils-gdb-0c7a8e5acd399d1d36dbe0cda815844dd5308c10.tar.gz
fsf-binutils-gdb-0c7a8e5acd399d1d36dbe0cda815844dd5308c10.tar.bz2
* 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.
Diffstat (limited to 'ld/emultempl/mipsecoff.em')
-rw-r--r--ld/emultempl/mipsecoff.em32
1 files changed, 12 insertions, 20 deletions
diff --git a/ld/emultempl/mipsecoff.em b/ld/emultempl/mipsecoff.em
index 89ca5c6..c0e8093 100644
--- a/ld/emultempl/mipsecoff.em
+++ b/ld/emultempl/mipsecoff.em
@@ -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}
@@ -44,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}");
@@ -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"
@@ -192,7 +184,7 @@ then
sc="-f stringify.sed"
cat >>e${EMULATION_NAME}.c <<EOF
-{
+{
*isfile = 0;
if (link_info.relocatable && config.build_constructors)
@@ -213,7 +205,7 @@ else
# Scripts read from the filesystem.
cat >>e${EMULATION_NAME}.c <<EOF
-{
+{
*isfile = 1;
if (link_info.relocatable && config.build_constructors)
@@ -233,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,