* Makefile.am: Bfin support.

* Makefile.in: Regenerated.
	* aclocal.m4: Regenerated.
	* configure.tgt: Bfin support.
	* emulparams/bfin.sh: New file.
	* emultempl/bfin.em: New file.
This commit is contained in:
Catherine Moore 2005-09-30 15:23:16 +00:00
parent 1d65ded423
commit 95f4309b98
7 changed files with 552 additions and 150 deletions

View file

@ -1,3 +1,12 @@
2005-09-30 Catherine Moore <clm@cm00re.com>
* Makefile.am: Bfin support.
* Makefile.in: Regenerated.
* aclocal.m4: Regenerated.
* configure.tgt: Bfin support.
* emulparams/bfin.sh: New file.
* emultempl/bfin.em: New file.
2005-09-30 Matthias Kurz <mk@baerlap.north.de> 2005-09-30 Matthias Kurz <mk@baerlap.north.de>
* ld.h: Prevent the inclusion of <libintl.h> from the Solaris * ld.h: Prevent the inclusion of <libintl.h> from the Solaris

View file

@ -148,6 +148,7 @@ ALL_EMULATIONS = \
eelf32_i860.o \ eelf32_i860.o \
eelf32_sparc.o \ eelf32_sparc.o \
eelf32b4300.o \ eelf32b4300.o \
eelf32bfin.o \
eelf32cr16c.o \ eelf32cr16c.o \
eelf32bmip.o \ eelf32bmip.o \
eelf32bmipn32.o \ eelf32bmipn32.o \
@ -615,6 +616,10 @@ ed30v_e.c: $(srcdir)/emulparams/d30v_e.sh \
edelta68.c: $(srcdir)/emulparams/delta68.sh \ edelta68.c: $(srcdir)/emulparams/delta68.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/delta68.sc ${GEN_DEPENDS} $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/delta68.sc ${GEN_DEPENDS}
${GENSCRIPTS} delta68 "$(tdir_delta68)" ${GENSCRIPTS} delta68 "$(tdir_delta68)"
eelf32bfin.c: $(srcdir)/emulparams/bfin.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/bfin.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32bfin "$(tdir_elf32bfin)" bfin
eelf32_dlx.c: $(srcdir)/emulparams/elf32_dlx.sh \ eelf32_dlx.c: $(srcdir)/emulparams/elf32_dlx.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/dlx.sc ${GEN_DEPENDS} $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/dlx.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32_dlx "$(tdir_elf32_dlx)" ${GENSCRIPTS} elf32_dlx "$(tdir_elf32_dlx)"

View file

@ -1,4 +1,4 @@
# Makefile.in generated by automake 1.9.5 from Makefile.am. # Makefile.in generated by automake 1.9.2 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@ -40,8 +40,9 @@ build_triplet = @build@
host_triplet = @host@ host_triplet = @host@
target_triplet = @target@ target_triplet = @target@
noinst_PROGRAMS = ld-new$(EXEEXT) noinst_PROGRAMS = ld-new$(EXEEXT)
DIST_COMMON = $(srcdir)/../config.guess $(srcdir)/../config.sub NEWS \ DIST_COMMON = $(srcdir)/../config.guess $(srcdir)/../config.sub \
README ChangeLog $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ INSTALL NEWS README AUTHORS ChangeLog COPYING THANKS \
$(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/configure $(am__configure_deps) \ $(top_srcdir)/configure $(am__configure_deps) \
$(srcdir)/config.in $(srcdir)/../mkinstalldirs \ $(srcdir)/config.in $(srcdir)/../mkinstalldirs \
$(top_srcdir)/po/Make-in ldgram.h ldgram.c ldlex.c deffilep.h \ $(top_srcdir)/po/Make-in ldgram.h ldgram.c ldlex.c deffilep.h \
@ -371,6 +372,7 @@ ALL_EMULATIONS = \
eelf32_i860.o \ eelf32_i860.o \
eelf32_sparc.o \ eelf32_sparc.o \
eelf32b4300.o \ eelf32b4300.o \
eelf32bfin.o \
eelf32cr16c.o \ eelf32cr16c.o \
eelf32bmip.o \ eelf32bmip.o \
eelf32bmipn32.o \ eelf32bmipn32.o \
@ -833,7 +835,7 @@ ld.html: ld.texinfo
$(DVIPS) -o $@ $< $(DVIPS) -o $@ $<
uninstall-info-am: uninstall-info-am:
@$(PRE_UNINSTALL) $(PRE_UNINSTALL)
@if (install-info --version && \ @if (install-info --version && \
install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
list='$(INFO_DEPS)'; \ list='$(INFO_DEPS)'; \
@ -849,7 +851,7 @@ uninstall-info-am:
relfile=`echo "$$file" | sed 's|^.*/||'`; \ relfile=`echo "$$file" | sed 's|^.*/||'`; \
relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \ relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \
(if cd "$(DESTDIR)$(infodir)"; then \ (if cd "$(DESTDIR)$(infodir)"; then \
echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \ echo " rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9])"; \
rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \ rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \
else :; fi); \ else :; fi); \
done done
@ -934,13 +936,7 @@ uninstall-man1:
# (which will cause the Makefiles to be regenerated when you run `make'); # (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line. # (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS): $(RECURSIVE_TARGETS):
@failcom='exit 1'; \ @set fnord $$MAKEFLAGS; amf=$$2; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \ dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \ target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \ list='$(SUBDIRS)'; for subdir in $$list; do \
@ -952,7 +948,7 @@ $(RECURSIVE_TARGETS):
local_target="$$target"; \ local_target="$$target"; \
fi; \ fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done; \ done; \
if test "$$dot_seen" = "no"; then \ if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
@ -960,13 +956,7 @@ $(RECURSIVE_TARGETS):
mostlyclean-recursive clean-recursive distclean-recursive \ mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive: maintainer-clean-recursive:
@failcom='exit 1'; \ @set fnord $$MAKEFLAGS; amf=$$2; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \ dot_seen=no; \
case "$@" in \ case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
@ -987,7 +977,7 @@ maintainer-clean-recursive:
local_target="$$target"; \ local_target="$$target"; \
fi; \ fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$$fail" done && test -z "$$fail"
tags-recursive: tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \ list='$(SUBDIRS)'; for subdir in $$list; do \
@ -1419,6 +1409,10 @@ ed30v_e.c: $(srcdir)/emulparams/d30v_e.sh \
edelta68.c: $(srcdir)/emulparams/delta68.sh \ edelta68.c: $(srcdir)/emulparams/delta68.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/delta68.sc ${GEN_DEPENDS} $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/delta68.sc ${GEN_DEPENDS}
${GENSCRIPTS} delta68 "$(tdir_delta68)" ${GENSCRIPTS} delta68 "$(tdir_delta68)"
eelf32bfin.c: $(srcdir)/emulparams/bfin.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/bfin.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32bfin "$(tdir_elf32bfin)" bfin
eelf32_dlx.c: $(srcdir)/emulparams/elf32_dlx.sh \ eelf32_dlx.c: $(srcdir)/emulparams/elf32_dlx.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/dlx.sc ${GEN_DEPENDS} $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/dlx.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32_dlx "$(tdir_elf32_dlx)" ${GENSCRIPTS} elf32_dlx "$(tdir_elf32_dlx)"

463
ld/aclocal.m4 vendored
View file

@ -1,4 +1,4 @@
# generated automatically by aclocal 1.9.5 -*- Autoconf -*- # generated automatically by aclocal 1.9.2 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# 2005 Free Software Foundation, Inc. # 2005 Free Software Foundation, Inc.
@ -11,11 +11,23 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE. # PARTICULAR PURPOSE.
# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. # -*- Autoconf -*-
# # Copyright (C) 2002, 2003 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation # Generated from amversion.in; do not edit by hand.
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# 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
# AM_AUTOMAKE_VERSION(VERSION) # AM_AUTOMAKE_VERSION(VERSION)
# ---------------------------- # ----------------------------
@ -28,15 +40,26 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
# Call AM_AUTOMAKE_VERSION so it can be traced. # Call AM_AUTOMAKE_VERSION so it can be traced.
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.9.5])]) [AM_AUTOMAKE_VERSION([1.9.2])])
# AM_AUX_DIR_EXPAND -*- Autoconf -*- # AM_AUX_DIR_EXPAND
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # Copyright (C) 2001, 2003 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation # This program is free software; you can redistribute it and/or modify
# gives unlimited permission to copy and/or distribute it, # it under the terms of the GNU General Public License as published by
# with or without modifications, as long as this notice is preserved. # the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# 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.
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
@ -83,16 +106,26 @@ AC_PREREQ([2.50])dnl
am_aux_dir=`cd $ac_aux_dir && pwd` am_aux_dir=`cd $ac_aux_dir && pwd`
]) ])
# AM_CONDITIONAL -*- Autoconf -*- # AM_CONDITIONAL -*- Autoconf -*-
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 # Copyright (C) 1997, 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 7 # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# 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.
# serial 6
# AM_CONDITIONAL(NAME, SHELL-CONDITION) # AM_CONDITIONAL(NAME, SHELL-CONDITION)
# ------------------------------------- # -------------------------------------
@ -116,15 +149,26 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.]]) Usually this means the macro was only invoked conditionally.]])
fi])]) fi])])
# serial 7 -*- Autoconf -*-
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
# Free Software Foundation, Inc. # Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 8 # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# 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.
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
# written in clear, in which case automake, when reading aclocal.m4, # written in clear, in which case automake, when reading aclocal.m4,
@ -133,6 +177,7 @@ fi])])
# CC etc. in the Makefile, will ask for an AC_PROG_CC use... # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
# _AM_DEPENDENCIES(NAME) # _AM_DEPENDENCIES(NAME)
# ---------------------- # ----------------------
# See how the compiler implements dependency checking. # See how the compiler implements dependency checking.
@ -272,16 +317,27 @@ AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
AC_SUBST([AMDEPBACKSLASH]) AC_SUBST([AMDEPBACKSLASH])
]) ])
# Generate code to set up dependency tracking. -*- Autoconf -*- # Generate code to set up dependency tracking. -*- Autoconf -*-
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
# Free Software Foundation, Inc. # Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
#serial 3 # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# 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.
#serial 2
# _AM_OUTPUT_DEPENDENCY_COMMANDS # _AM_OUTPUT_DEPENDENCY_COMMANDS
# ------------------------------ # ------------------------------
@ -340,32 +396,55 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
]) ])
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 8 # Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# 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.
# serial 7
# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
# Do all the work for Automake. -*- Autoconf -*- # Do all the work for Automake. -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 # This macro actually does too much some checks are only needed if
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 12
# This macro actually does too much. Some checks are only needed if
# your package does certain things. But this isn't really a big deal. # your package does certain things. But this isn't really a big deal.
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# 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.
# serial 11
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
# AM_INIT_AUTOMAKE([OPTIONS]) # AM_INIT_AUTOMAKE([OPTIONS])
# ----------------------------------------------- # -----------------------------------------------
@ -466,27 +545,51 @@ for _am_header in $config_headers :; do
done done
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# AM_PROG_INSTALL_SH # AM_PROG_INSTALL_SH
# ------------------ # ------------------
# Define $install_sh. # Define $install_sh.
# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# 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.
AC_DEFUN([AM_PROG_INSTALL_SH], AC_DEFUN([AM_PROG_INSTALL_SH],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
install_sh=${install_sh-"$am_aux_dir/install-sh"} install_sh=${install_sh-"$am_aux_dir/install-sh"}
AC_SUBST(install_sh)]) AC_SUBST(install_sh)])
# Copyright (C) 2003, 2005 Free Software Foundation, Inc. # -*- Autoconf -*-
# # Copyright (C) 2003 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 2 # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# 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.
# serial 1
# Check whether the underlying file-system supports filenames # Check whether the underlying file-system supports filenames
# with a leading dot. For instance MS-DOS doesn't. # with a leading dot. For instance MS-DOS doesn't.
@ -501,14 +604,26 @@ fi
rmdir .tst 2>/dev/null rmdir .tst 2>/dev/null
AC_SUBST([am__leading_dot])]) AC_SUBST([am__leading_dot])])
# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 5 # Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# 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.
# serial 4
# AM_PROG_LEX # AM_PROG_LEX
# ----------- # -----------
@ -522,17 +637,28 @@ if test "$LEX" = :; then
LEX=${am_missing_run}flex LEX=${am_missing_run}flex
fi]) fi])
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # Add --enable-maintainer-mode option to configure.
# From Jim Meyering # From Jim Meyering
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004
# Free Software Foundation, Inc. # Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 4 # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# 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.
# serial 3
AC_DEFUN([AM_MAINTAINER_MODE], AC_DEFUN([AM_MAINTAINER_MODE],
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
@ -551,15 +677,26 @@ AC_DEFUN([AM_MAINTAINER_MODE],
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
# Check to see how 'make' treats includes. -*- Autoconf -*- # Check to see how 'make' treats includes. -*- Autoconf -*-
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 3 # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# 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.
# serial 2
# AM_MAKE_INCLUDE() # AM_MAKE_INCLUDE()
# ----------------- # -----------------
@ -603,16 +740,27 @@ AC_MSG_RESULT([$_am_result])
rm -f confinc confmf rm -f confinc confmf
]) ])
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # -*- Autoconf -*-
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 4 # Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# 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.
# serial 3
# AM_MISSING_PROG(NAME, PROGRAM) # AM_MISSING_PROG(NAME, PROGRAM)
# ------------------------------ # ------------------------------
@ -638,16 +786,27 @@ else
fi fi
]) ])
# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# AM_PROG_MKDIR_P # AM_PROG_MKDIR_P
# --------------- # ---------------
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
#
# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# 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.
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
# created by `make install' are always world readable, even if the # created by `make install' are always world readable, even if the
# installer happens to have an overly restrictive umask (e.g. 077). # installer happens to have an overly restrictive umask (e.g. 077).
@ -701,15 +860,26 @@ else
fi fi
AC_SUBST([mkdir_p])]) AC_SUBST([mkdir_p])])
# Helper functions for option handling. -*- Autoconf -*- # Helper functions for option handling. -*- Autoconf -*-
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 3 # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# 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.
# serial 2
# _AM_MANGLE_OPTION(NAME) # _AM_MANGLE_OPTION(NAME)
# ----------------------- # -----------------------
@ -734,16 +904,28 @@ AC_DEFUN([_AM_SET_OPTIONS],
AC_DEFUN([_AM_IF_OPTION], AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
# Check to make sure that the build environment is sane. -*- Autoconf -*-
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
# Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # Check to make sure that the build environment is sane.
# gives unlimited permission to copy and/or distribute it, #
# with or without modifications, as long as this notice is preserved.
# serial 4 # Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# 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.
# serial 3
# AM_SANITY_CHECK # AM_SANITY_CHECK
# --------------- # ---------------
@ -786,14 +968,25 @@ Check your system clock])
fi fi
AC_MSG_RESULT(yes)]) AC_MSG_RESULT(yes)])
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# AM_PROG_INSTALL_STRIP # AM_PROG_INSTALL_STRIP
# ---------------------
# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# 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.
# One issue with vendor `install' (even GNU) is that you can't # One issue with vendor `install' (even GNU) is that you can't
# specify the program used to strip binaries. This is especially # specify the program used to strip binaries. This is especially
# annoying in cross-compiling environments, where the build's strip # annoying in cross-compiling environments, where the build's strip
@ -816,13 +1009,25 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])])
# Check how to create a tarball. -*- Autoconf -*- # Check how to create a tarball. -*- Autoconf -*-
# Copyright (C) 2004, 2005 Free Software Foundation, Inc. # Copyright (C) 2004 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation # This program is free software; you can redistribute it and/or modify
# gives unlimited permission to copy and/or distribute it, # it under the terms of the GNU General Public License as published by
# with or without modifications, as long as this notice is preserved. # the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# 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.
# serial 1
# serial 2
# _AM_PROG_TAR(FORMAT) # _AM_PROG_TAR(FORMAT)
# -------------------- # --------------------

View file

@ -83,6 +83,8 @@ xscale-*-elf) targ_emul=armelf
avr-*-*) targ_emul=avr2 avr-*-*) targ_emul=avr2
targ_extra_emuls="avr1 avr3 avr4 avr5" targ_extra_emuls="avr1 avr3 avr4 avr5"
;; ;;
bfin-*-elf) targ_emul=elf32bfin ;;
bfin-*-uclinux*) targ_emul=elf32bfin ;;
cr16c-*-elf*) targ_emul=elf32cr16c cr16c-*-elf*) targ_emul=elf32cr16c
;; ;;
cris-*-*aout*) targ_emul=crisaout cris-*-*aout*) targ_emul=crisaout

13
ld/emulparams/bfin.sh Executable file
View file

@ -0,0 +1,13 @@
SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-bfin"
TEXT_START_ADDR=0x0
MAXPAGESIZE=0x1000
TARGET_PAGE_SIZE=0x1000
NONPAGED_TEXT_START_ADDR=${TEXT_START_ADDR}
ARCH=bfin
MACHINE=
ENTRY=_start
TEMPLATE_NAME=elf32
GENERATE_SHLIB_SCRIPT=yes
EMBEDDED=yes
EXTRA_EM_FILE=bfin

174
ld/emultempl/bfin.em Normal file
View file

@ -0,0 +1,174 @@
# This shell script emits a C file. -*- C -*-
# 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.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# 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 file is sourced from elf32.em, and defines some extra routines for bfin
# embedded systems using ELF and for some other systems using bfin ELF. While
# it is sourced from elf32.em for all bfin ELF configurations, here we include
# only the features we want depending on the configuration.
case ${target} in
bfin*-*-elf)
echo "#define SUPPORT_EMBEDDED_RELOCS" >>e${EMULATION_NAME}.c
;;
esac
cat >>e${EMULATION_NAME}.c <<EOF
#ifdef SUPPORT_EMBEDDED_RELOCS
static void check_sections (bfd *, asection *, void *);
#endif
/* This function is run after all the input files have been opened. */
static void
bfin_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.relocatable))
{
bfd *abfd;
/* In the embedded relocs mode we create a .emreloc section for each
input file with a nonzero .data section. The BFD backend will fill in
these sections with magic numbers which can be used to relocate the
data section at run time. */
for (abfd = link_info.input_bfds; abfd != NULL; abfd = abfd->link_next)
{
asection *datasec;
/* As first-order business, make sure that each input BFD is either
COFF or ELF. We need to call a special BFD backend function to
generate the embedded relocs, and we have such functions only for
COFF and ELF. */
if (bfd_get_flavour (abfd) != bfd_target_coff_flavour
&& bfd_get_flavour (abfd) != bfd_target_elf_flavour)
einfo ("%F%B: all input objects must be COFF or ELF for --embedded-relocs\n");
datasec = bfd_get_section_by_name (abfd, ".data");
/* Note that we assume that the reloc_count field has already
been set up. We could call bfd_get_reloc_upper_bound, but
that returns the size of a memory buffer rather than a reloc
count. We do not want to call bfd_canonicalize_reloc,
because although it would always work it would force us to
read in the relocs into BFD canonical form, which would waste
a significant amount of time and memory. */
if (datasec != NULL && datasec->reloc_count > 0)
{
asection *relsec;
relsec = bfd_make_section (abfd, ".emreloc");
if (relsec == NULL
|| ! bfd_set_section_flags (abfd, relsec,
(SEC_ALLOC
| SEC_LOAD
| SEC_HAS_CONTENTS
| SEC_IN_MEMORY))
|| ! bfd_set_section_alignment (abfd, relsec, 2)
|| ! bfd_set_section_size (abfd, relsec,
datasec->reloc_count * 12))
einfo ("%F%B: can not create .emreloc section: %E\n");
}
/* Double check that all other data sections are empty, as is
required for embedded PIC code. */
bfd_map_over_sections (abfd, check_sections, datasec);
}
}
#endif /* SUPPORT_EMBEDDED_RELOCS */
}
#ifdef SUPPORT_EMBEDDED_RELOCS
/* Check that of the data sections, only the .data section has
relocs. This is called via bfd_map_over_sections. */
static void
check_sections (bfd *abfd, asection *sec, void *datasec)
{
if ((bfd_get_section_flags (abfd, sec) & SEC_DATA)
&& 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));
}
#endif /* SUPPORT_EMBEDDED_RELOCS */
/* This function is called after the section sizes and offsets have
been set. */
static void
bfin_elf_after_allocation (void)
{
/* Call the standard elf routine. */
after_allocation_default ();
#ifdef SUPPORT_EMBEDDED_RELOCS
if (command_line.embedded_relocs
&& (! link_info.relocatable))
{
bfd *abfd;
/* If we are generating embedded relocs, call a special BFD backend
routine to do the work. */
for (abfd = link_info.input_bfds; abfd != NULL; abfd = abfd->link_next)
{
asection *datasec, *relsec;
char *errmsg;
datasec = bfd_get_section_by_name (abfd, ".data");
if (datasec == NULL || datasec->reloc_count == 0)
continue;
relsec = bfd_get_section_by_name (abfd, ".emreloc");
ASSERT (relsec != NULL);
if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
{
if (! bfd_bfin_elf32_create_embedded_relocs (abfd, &link_info,
datasec, relsec,
&errmsg))
{
if (errmsg == NULL)
einfo ("%B%X: can not create runtime reloc information: %E\n",
abfd);
else
einfo ("%X%B: can not create runtime reloc information: %s\n",
abfd, errmsg);
}
}
else
abort ();
}
}
#endif /* SUPPORT_EMBEDDED_RELOCS */
}
EOF
# We have our own after_open and after_allocation functions, but they call
# the standard routines, so give them a different name.
LDEMUL_AFTER_OPEN=bfin_elf_after_open
LDEMUL_AFTER_ALLOCATION=bfin_elf_after_allocation