Mon Oct 5 08:55:14 1992 Steve Chamberlain (sac@thepub.cygnus.com)
[deliverable/binutils-gdb.git] / ld / st2000.em
CommitLineData
d73812a1 1cat >em_${EMULATION_NAME}.c <<EOF
3d2b83ea
SC
2/* Copyright (C) 1991 Free Software Foundation, Inc.
3
4This file is part of GLD, the Gnu Linker.
5
6GLD is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 1, or (at your option)
9any later version.
10
11GLD is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with GLD; see the file COPYING. If not, write to
18the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
19
20/*
21 Written by Steve Chamberlain steve@cygnus.com
22
23*/
24
25#include "bfd.h"
26#include "sysdep.h"
27
28#include "ld.h"
29#include "config.h"
30#include "ldemul.h"
31#include "ldfile.h"
32#include "ldmisc.h"
33
34extern boolean lang_float_flag;
35
36
37extern enum bfd_architecture ldfile_output_architecture;
38extern unsigned long ldfile_output_machine;
39extern char *ldfile_output_machine_name;
40
41extern bfd *output_bfd;
42
43
44
45static void st2000_before_parse()
46{
47 ldfile_output_architecture = bfd_arch_m68k;
48}
49
50static char *st2000_script =
51#include "st2000.x"
52;
53static char *st2000_script_option_Ur =
54#include "st2000.x"
55;
56static char *st2000_script_option_r =
57#include "st2000.x"
58;
59
60static char *st2000_get_script()
61{
62 extern ld_config_type config;
63 if (config.relocateable_output == true &&
64 config.build_constructors == true) {
65 return st2000_script_option_Ur;
66 }
67 if (config.relocateable_output) {
68 return st2000_script_option_r;
69 }
70
71 return st2000_script;
72}
73struct ld_emulation_xfer_struct ld_st2000_emulation =
74{
75 st2000_before_parse,
76 syslib_default,
77 hll_default,
78 after_parse_default,
79 after_allocation_default,
80 set_output_arch_default,
81 ldemul_default_target,
82 before_allocation_default,
83 st2000_get_script,
84 "st2000"
85};
86EOF
This page took 0.03518 seconds and 4 git commands to generate.