# It does some substitutions.
cat >e${EMULATION_NAME}.c <<EOF
/* intel coff loader emulation specific stuff
- Copyright 1991, 1992, 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2003
- Free Software Foundation, Inc.
+ Copyright 1991, 1992, 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2003,
+ 2005, 2007 Free Software Foundation, Inc.
Written by Steve Chamberlain steve@cygnus.com
This file is part of GLD, the Gnu Linker.
You should have received a copy of the GNU General Public License
along with GLD; see the file COPYING. If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+the Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
+#include "sysdep.h"
#include "libiberty.h"
#include "bfd.h"
-#include "sysdep.h"
#include "bfdlink.h"
/*#include "archures.h"*/
}
-#ifdef GNU960
-
-static void
-lnk960_before_parse (void)
-{
- static char *env_variables[] = { "G960LIB", "G960BASE", 0 };
- char **p;
- char *env ;
-
- for (p = env_variables; *p; p++)
- {
- env = (char *) getenv (*p);
- if (env)
- ldfile_add_library_path (concat (env, "/lib/libcoff", ""), FALSE);
- }
-
- env = (char *) getenv ("I960BASE");
- if (env)
- ldfile_add_library_path(concat (env, "/lib", ""), FALSE);
-
- ldfile_output_architecture = bfd_arch_i960;
- ldfile_output_machine = bfd_mach_i960_core;
-}
-
-#else /* not GNU960 */
-
static void
lnk960_before_parse (void)
{
einfo ("%P%F I960BASE and G960BASE not set\n");
}
-
- ldfile_add_library_path (concat (name, "/lib", ""), FALSE);
+ ldfile_add_library_path (concat (name, "/lib", NULL), FALSE);
ldfile_output_architecture = bfd_arch_i960;
ldfile_output_machine = bfd_mach_i960_core;
}
-#endif /* GNU960 */
-
-
static void
add_on (lib_list_type *list, lang_input_file_enum_type search)
{
add_on (syslib_list, lang_input_file_is_search_file_enum);
}
-static void
-lnk960_before_allocation (void)
-{
-}
-
static void
lnk960_after_allocation (void)
{
static char *
lnk960_choose_target (int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
{
-#ifdef GNU960
-
- return bfd_make_targ_name (BFD_COFF_FORMAT, 0);
-
-#else
-
char *from_outside = getenv (TARGET_ENVIRON);
if (from_outside != (char *) NULL)
return from_outside;
#else
return "coff-Intel-big";
#endif
-#endif
-
}
static char *
lnk960_after_allocation,
lnk960_set_output_arch,
lnk960_choose_target,
- lnk960_before_allocation,
+ before_allocation_default,
lnk960_get_script,
"lnk960",
"",
- NULL, /* finish */
+ finish_default,
NULL, /* create output section statements */
NULL, /* open dynamic archive */
NULL, /* place orphan */