Removed extern declarations
[deliverable/binutils-gdb.git] / ld / ld-emul.c
CommitLineData
2fa0b342
DHW
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/*
99fe4553
SC
20 * $Id$
21 */
22
2fa0b342
DHW
23/*
24 * clearing house for ld emulation states
25 */
26
27#include "sysdep.h"
28#include "bfd.h"
29
30#include "config.h"
31#include "ld.h"
32#include "ld-emul.h"
33#include "ldmisc.h"
34
35extern ld_emulation_xfer_type ld_lnk960_emulation;
36extern ld_emulation_xfer_type ld_gld_emulation;
1418c83b 37extern ld_emulation_xfer_type ld_vanilla_emulation;
7ca04d28 38extern ld_emulation_xfer_type ld_gld68k_emulation;
2fa0b342
DHW
39extern ld_emulation_xfer_type ld_gld960_emulation;
40
41
42
43ld_emulation_xfer_type *ld_emulation;
44
45void
46ldemul_hll(name)
47char *name;
48{
49 ld_emulation->hll(name);
50}
51
52
53void ldemul_syslib(name)
54char *name;
55{
56 ld_emulation->syslib(name);
57}
58
59void
60ldemul_after_parse()
61{
62 ld_emulation->after_parse();
63}
64
65void
66ldemul_before_parse()
67{
68 ld_emulation->before_parse();
69}
70
71void
72ldemul_after_allocation()
73{
74 ld_emulation->after_allocation();
75}
76
77void
78ldemul_before_allocation()
79{
80 if (ld_emulation->before_allocation) {
81 ld_emulation->before_allocation();
82 }
83}
84
85
86void
87ldemul_set_output_arch()
88{
89 ld_emulation->set_output_arch();
90}
91
92char *
93ldemul_choose_target()
94{
95 return ld_emulation->choose_target();
96}
97
98char *
99ldemul_get_script()
100{
101 return ld_emulation->get_script();
102}
103
104void
105ldemul_choose_mode(target)
106char *target;
107{
108 if (strcmp(target,LNK960_EMULATION_NAME)==0) {
109 ld_emulation = &ld_lnk960_emulation;
110 }
99fe4553
SC
111 else if (strcmp(target,GLD960_EMULATION_NAME)==0) {
112 ld_emulation = &ld_gld960_emulation;
113 }
114#ifndef GNU960
2fa0b342
DHW
115 else if (strcmp(target,GLD_EMULATION_NAME)==0) {
116 ld_emulation = &ld_gld_emulation;
117 }
1418c83b
SC
118 else if (strcmp(target,VANILLA_EMULATION_NAME)==0) {
119 ld_emulation = &ld_vanilla_emulation;
120 }
7ca04d28
SC
121 else if (strcmp(target,GLD68K_EMULATION_NAME)==0) {
122 ld_emulation = &ld_gld68k_emulation;
123 }
99fe4553 124#endif
2fa0b342 125 else {
de7c1ff6 126 info("%P%F unrecognised emulation mode: %s\n",target);
2fa0b342
DHW
127 }
128}
129
130
131
This page took 0.027892 seconds and 4 git commands to generate.