* ldsym.c (write_file_locals): Write BSF_CONSTRUCTOR
[deliverable/binutils-gdb.git] / ld / h8500hms.em
CommitLineData
d73812a1 1cat >em_${EMULATION_NAME}.c <<EOF
55237887 2/* Copyright (C) 1993 Free Software Foundation, Inc.
9d1fe8a4
SC
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/*
55237887 21 Written by Steve Chamberlain sac@cygnus.com
9d1fe8a4
SC
22
23 The controller which tells the gnu linker how to behave like one for
55237887 24 the Hitach H8/500.
9d1fe8a4
SC
25*/
26
27#include "bfd.h"
28#include "sysdep.h"
29
30#include "ld.h"
31#include "config.h"
32#include "ldemul.h"
33#include "ldfile.h"
34#include "ldmisc.h"
35
36extern boolean lang_float_flag;
37
38
39extern enum bfd_architecture ldfile_output_architecture;
40extern unsigned long ldfile_output_machine;
41extern char *ldfile_output_machine_name;
42
43extern bfd *output_bfd;
44
45
46
55237887 47static void h8500hms_before_parse()
9d1fe8a4 48{
55237887 49 ldfile_output_architecture = bfd_arch_h8500;
9d1fe8a4
SC
50}
51
55237887
SC
52static char *h8500hms_script =
53#include "h8500hms.x"
9d1fe8a4 54;
55237887
SC
55static char *h8500hms_script_option_Ur =
56#include "h8500hms.xu"
9d1fe8a4 57;
55237887
SC
58static char *h8500hms_script_option_r =
59#include "h8500hms.xr"
9d1fe8a4
SC
60;
61
55237887 62static char *h8500hms_get_script()
9d1fe8a4
SC
63{
64 extern ld_config_type config;
65 if (config.relocateable_output == true &&
66 config.build_constructors == true) {
55237887 67 return h8500hms_script_option_Ur;
9d1fe8a4
SC
68 }
69 if (config.relocateable_output) {
55237887 70 return h8500hms_script_option_r;
9d1fe8a4
SC
71 }
72
55237887 73 return h8500hms_script;
9d1fe8a4 74}
55237887 75struct ld_emulation_xfer_struct ld_h8500hms_emulation =
9d1fe8a4 76{
55237887 77 h8500hms_before_parse,
9d1fe8a4
SC
78 syslib_default,
79 hll_default,
80 after_parse_default,
81 after_allocation_default,
82 set_output_arch_default,
83 ldemul_default_target,
84 before_allocation_default,
55237887
SC
85 h8500hms_get_script,
86 "h8500hms"
9d1fe8a4
SC
87};
88EOF
This page took 0.052581 seconds and 4 git commands to generate.