added mri.c
[deliverable/binutils-gdb.git] / ld / ld-gldm88kbcs.c
CommitLineData
1327fb29
SC
1/* Copyright (C) 1991 Free Software Foundation, Inc.
2
3This file is part of GLD, the Gnu Linker.
4
5GLD is free software; you can redistribute it and/or modify
6it under the terms of the GNU General Public License as published by
7the Free Software Foundation; either version 1, or (at your option)
8any later version.
9
10GLD is distributed in the hope that it will be useful,
11but WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with GLD; see the file COPYING. If not, write to
17the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
18
19/*
20 * $Id$
21 *
22*/
23
24/*
25 * Written by Steve Chamberlain steve@cygnus.com
26 */
27
28
29#include "sysdep.h"
30#include "bfd.h"
31
32
33#include "ld.h"
34#include "config.h"
35#include "ld-emul.h"
36#include "ldfile.h"
37#include "ldmisc.h"
38
39extern boolean lang_float_flag;
40
41
42extern enum bfd_architecture ldfile_output_architecture;
43extern unsigned long ldfile_output_machine;
44extern char *ldfile_output_machine_name;
45
46extern bfd *output_bfd;
47
48
49
50static void gldm88kbcs_before_parse()
51{
52
53}
54
55
56static void
57gldm88kbcs_after_parse()
58{
59
60}
61
62static void
63gldm88kbcs_after_allocation()
64{
65
66}
67
68static void
69gldm88kbcs_before_allocation()
70{
71
72}
73
74
75static void
76gldm88kbcs_set_output_arch()
77{
78 /* Set the output architecture and machine if possible */
79 bfd_set_arch_mach(output_bfd, ldfile_output_architecture, ldfile_output_machine);
80}
81
82static char *
83gldm88kbcs_choose_target()
84{
85 char *from_outside = getenv(TARGET_ENVIRON);
86 if (from_outside != (char *)NULL)
87 return from_outside;
88 return GLDM88KBCS_TARGET;
89}
90
91static void
92gldm88kbcs_syslib()
93{
94 info("%S SYSLIB ignored\n");
95}
96
97static void
98gldm88kbcs_hll(ignore)
99char *ignore;
100{
101 info("%S HLL ignored\n");
102}
103
104static char *gldm88kbcs_script =
105#include "ld-gldm88kbcs.x"
106;
107
108static char *gldm88kbcs_script_option_Ur =
109#include "ld-gldm88kbcs-Ur.x"
110;
111
112static char *gldm88kbcs_script_option_r =
113#include "ld-gldm88kbcs-r.x"
114;
115
116static char *gldm88kbcs_get_script()
117{
118 extern ld_config_type config;
119 if (config.relocateable_output == true &&
120 config.build_constructors == true) {
121 return gldm88kbcs_script_option_Ur;
122 }
123 if (config.relocateable_output) {
124 return gldm88kbcs_script_option_r;
125 }
126
127 return gldm88kbcs_script;
128}
129struct ld_emulation_xfer_struct ld_gldm88kbcs_emulation =
130{
131 gldm88kbcs_before_parse,
132 gldm88kbcs_syslib,
133 gldm88kbcs_hll,
134 gldm88kbcs_after_parse,
135 gldm88kbcs_after_allocation,
136 gldm88kbcs_set_output_arch,
137 gldm88kbcs_choose_target,
138 gldm88kbcs_before_allocation,
139 gldm88kbcs_get_script,
140};
141
This page took 0.04689 seconds and 4 git commands to generate.