]>
Commit | Line | Data |
---|---|---|
2d1a2445 PB |
1 | /* A vanilla emulation with no defaults |
2 | Copyright (C) 1991 Free Software Foundation, Inc. | |
3 | Written by Steve Chamberlain [email protected] | |
15ed1567 SC |
4 | |
5 | This file is part of GLD, the Gnu Linker. | |
6 | ||
2d1a2445 | 7 | This program is free software; you can redistribute it and/or modify |
15ed1567 | 8 | it under the terms of the GNU General Public License as published by |
2d1a2445 PB |
9 | the Free Software Foundation; either version 2 of the License, or |
10 | (at your option) any later version. | |
15ed1567 | 11 | |
2d1a2445 | 12 | This program is distributed in the hope that it will be useful, |
15ed1567 SC |
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | GNU General Public License for more details. | |
16 | ||
17 | You should have received a copy of the GNU General Public License | |
2d1a2445 PB |
18 | along with this program; if not, write to the Free Software |
19 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | |
15ed1567 SC |
20 | |
21 | /* | |
22 | * $Id$ | |
15ed1567 SC |
23 | */ |
24 | ||
15ed1567 | 25 | #include "bfd.h" |
f177a611 | 26 | #include "sysdep.h" |
15ed1567 SC |
27 | |
28 | ||
29 | #include "ld.h" | |
30 | #include "config.h" | |
31 | #include "ldemul.h" | |
32 | #include "ldfile.h" | |
33 | #include "ldmisc.h" | |
34 | ||
35 | extern boolean lang_float_flag; | |
36 | ||
37 | ||
38 | extern enum bfd_architecture ldfile_output_architecture; | |
39 | extern unsigned long ldfile_output_machine; | |
40 | extern char *ldfile_output_machine_name; | |
41 | ||
42 | extern bfd *output_bfd; | |
43 | ||
44 | ||
45 | ||
46 | static void vanilla_before_parse() | |
47 | { | |
48 | } | |
49 | ||
50 | ||
51 | static void | |
52 | vanilla_after_parse() | |
53 | { | |
54 | ||
55 | } | |
56 | ||
57 | static void | |
58 | vanilla_after_allocation() | |
59 | { | |
60 | ||
61 | } | |
62 | ||
63 | static void | |
64 | vanilla_before_allocation() | |
65 | { | |
66 | ||
67 | } | |
68 | ||
69 | ||
70 | static void | |
71 | vanilla_set_output_arch() | |
72 | { | |
73 | /* Set the output architecture and machine if possible */ | |
74 | unsigned long machine = 0; | |
75 | bfd_set_arch_mach(output_bfd, ldfile_output_architecture, machine); | |
76 | } | |
77 | ||
78 | static char * | |
79 | vanilla_choose_target() | |
80 | { | |
81 | char *from_outside = getenv(TARGET_ENVIRON); | |
82 | if (from_outside != (char *)NULL) | |
83 | return from_outside; | |
84 | return VANILLA_TARGET; | |
85 | } | |
86 | ||
87 | static void | |
88 | vanilla_syslib() | |
89 | { | |
90 | info("%S SYSLIB ignored\n"); | |
91 | } | |
92 | ||
93 | static void | |
94 | vanilla_hll(ignore) | |
95 | char *ignore; | |
96 | { | |
97 | info("%S HLL ignored\n"); | |
98 | } | |
99 | ||
100 | ||
101 | static char *vanilla_get_script() | |
102 | { | |
103 | return ""; | |
104 | } | |
105 | ||
106 | struct ld_emulation_xfer_struct ld_vanilla_emulation = | |
107 | { | |
108 | vanilla_before_parse, | |
109 | vanilla_syslib, | |
110 | vanilla_hll, | |
111 | vanilla_after_parse, | |
112 | vanilla_after_allocation, | |
113 | vanilla_set_output_arch, | |
114 | vanilla_choose_target, | |
115 | vanilla_before_allocation, | |
116 | vanilla_get_script, | |
117 | }; | |
118 |