# This shell script emits a C file. -*- C -*-
-# Copyright (C) 2000 Free Software Foundation, Inc.
+# Copyright 2000, 2001, 2003 Free Software Foundation, Inc.
# Written by Michael Sokolov <msokolov@ivan.Harhan.ORG>, based on armelf.em
#
# This file is part of GLD, the Gnu Linker.
#
# 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.
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
# This file is sourced from elf32.em, and defines some extra routines for m68k
# embedded systems using ELF and for some other systems using m68k ELF. While
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 ();
#ifdef SUPPORT_EMBEDDED_RELOCS
if (command_line.embedded_relocs
- && (! link_info.relocateable))
+ && (! link_info.relocatable))
{
bfd *abfd;
/* 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);
}
}
#endif /* SUPPORT_EMBEDDED_RELOCS */
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));
been set. */
static void
-m68k_elf_after_allocation ()
+m68k_elf_after_allocation (void)
{
/* Call the standard elf routine. */
after_allocation_default ();
#ifdef SUPPORT_EMBEDDED_RELOCS
if (command_line.embedded_relocs
- && (! link_info.relocateable))
+ && (! link_info.relocatable))
{
bfd *abfd;