1 cat >em_${EMULATION_NAME}.c <<EOF
2 /* An emulation for HP PA-RISC OSF/1 linkers.
3 Copyright (C) 1991 Free Software Foundation, Inc.
6 This file is part of GLD, the Gnu Linker.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
32 extern boolean lang_float_flag;
35 extern enum bfd_architecture ldfile_output_architecture;
36 extern unsigned long ldfile_output_machine;
37 extern char *ldfile_output_machine_name;
39 extern bfd *output_bfd;
44 static void hppaosf_before_parse()
46 static char *env_variables[] = { "HPPALIB", "HPPABASE", 0 };
50 for ( p = env_variables; *p; p++ ){
51 env = (char *) getenv(*p);
53 ldfile_add_library_path(concat(env,"/lib/libbout",""));
56 ldfile_output_architecture = bfd_arch_hppa;
59 static void hppaosf_before_parse()
62 env = getenv("HPPALIB");
64 ldfile_add_library_path(env);
66 env = getenv("HPPABASE");
68 ldfile_add_library_path(concat(env,"/lib",""));
70 ldfile_output_architecture = bfd_arch_hppa;
75 hppaosf_set_output_arch()
77 /* Set the output architecture and machine if possible */
78 unsigned long machine = 0;
79 bfd_set_arch_mach(output_bfd, ldfile_output_architecture, machine);
87 static char *script_reloc =
92 static char *hppaosf_get_script()
94 extern ld_config_type config;
95 if (config.relocateable_output)
101 struct ld_emulation_xfer_struct ld_hppaosf_emulation =
103 hppaosf_before_parse,
107 after_allocation_default,
108 hppaosf_set_output_arch,
109 ldemul_default_target,
110 before_allocation_default,