]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - ld/ldfile.h
Hurd port: update interface to match upstream and fix warnings.
[thirdparty/binutils-gdb.git] / ld / ldfile.h
1 /* ldfile.h -
2 Copyright (C) 1991-2024 Free Software Foundation, Inc.
3
4 This file is part of the GNU Binutils.
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
19 MA 02110-1301, USA. */
20
21 #ifndef LDFILE_H
22 #define LDFILE_H
23
24 extern bool ldfile_assumed_script;
25 extern unsigned long ldfile_output_machine;
26 extern enum bfd_architecture ldfile_output_architecture;
27 extern const char *ldfile_output_machine_name;
28
29 /* Structure used to hold the list of directories to search for
30 libraries. */
31
32 typedef struct search_dirs
33 {
34 /* Next directory on list. */
35 struct search_dirs *next;
36 /* Name of directory. */
37 const char *name;
38 /* TRUE if this is from the command line. */
39 bool cmdline;
40 } search_dirs_type;
41
42 enum script_open_style
43 {
44 script_nonT,
45 script_T,
46 script_defaultT
47 };
48
49 struct script_name_list
50 {
51 struct script_name_list * next;
52 enum script_open_style open_how;
53 char name[1];
54 };
55
56 extern struct script_name_list * processed_scripts;
57
58 extern search_dirs_type *search_head;
59
60 extern void ldfile_add_arch
61 (const char *);
62 extern void ldfile_add_library_path
63 (const char *, bool cmdline);
64 extern void ldfile_open_command_file
65 (const char *name);
66 extern void ldfile_open_script_file
67 (const char *name);
68 extern void ldfile_open_default_command_file
69 (const char *name);
70 extern void ldfile_open_file
71 (struct lang_input_statement_struct *);
72 extern bool ldfile_try_open_bfd
73 (const char *, struct lang_input_statement_struct *);
74 extern void ldfile_set_output_arch
75 (const char *, enum bfd_architecture);
76 extern bool ldfile_open_file_search
77 (const char *arch, struct lang_input_statement_struct *,
78 const char *lib, const char *suffix);
79
80 extern void ldfile_add_remap
81 (const char *, const char *);
82 extern bool ldfile_add_remap_file
83 (const char *);
84 extern void ldfile_remap_input_free
85 (void);
86 extern const char * ldfile_possibly_remap_input
87 (const char *);
88 extern void ldfile_print_input_remaps
89 (void);
90
91 #endif