xref: /openbsd-src/gnu/usr.bin/binutils/ld/ldfile.h (revision 007c2a4539b8b8aaa95c5e73e77620090abe113b)
12159047fSniklas /* ldfile.h -
2*007c2a45Smiod    Copyright 1991, 1992, 1993, 1994, 1995, 2000, 2002, 2003, 2004
3b55d4692Sfgsch    Free Software Foundation, Inc.
42159047fSniklas 
52159047fSniklas    This file is part of GLD, the Gnu Linker.
62159047fSniklas 
72159047fSniklas    GLD is free software; you can redistribute it and/or modify
82159047fSniklas    it under the terms of the GNU General Public License as published by
9c074d1c9Sdrahn    the Free Software Foundation; either version 2, or (at your option)
102159047fSniklas    any later version.
112159047fSniklas 
122159047fSniklas    GLD is distributed in the hope that it will be useful,
132159047fSniklas    but WITHOUT ANY WARRANTY; without even the implied warranty of
142159047fSniklas    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
152159047fSniklas    GNU General Public License for more details.
162159047fSniklas 
172159047fSniklas    You should have received a copy of the GNU General Public License
182159047fSniklas    along with GLD; see the file COPYING.  If not, write to
19*007c2a45Smiod    the Free Software Foundation, 59 Temple Place - Suite 330,
20*007c2a45Smiod    Boston, MA 02111-1307, USA.  */
212159047fSniklas 
22b55d4692Sfgsch #ifndef LDFILE_H
23b55d4692Sfgsch #define LDFILE_H
24b55d4692Sfgsch 
252159047fSniklas extern const char *ldfile_input_filename;
26c074d1c9Sdrahn extern bfd_boolean ldfile_assumed_script;
272159047fSniklas extern unsigned long ldfile_output_machine;
282159047fSniklas extern enum bfd_architecture ldfile_output_architecture;
292159047fSniklas extern const char *ldfile_output_machine_name;
302159047fSniklas 
312159047fSniklas /* Structure used to hold the list of directories to search for
322159047fSniklas    libraries.  */
332159047fSniklas 
34b55d4692Sfgsch typedef struct search_dirs {
352159047fSniklas   /* Next directory on list.  */
362159047fSniklas   struct search_dirs *next;
372159047fSniklas   /* Name of directory.  */
382159047fSniklas   const char *name;
39c074d1c9Sdrahn   /* TRUE if this is from the command line.  */
40c074d1c9Sdrahn   bfd_boolean cmdline;
41c074d1c9Sdrahn   /* true if this is from within the sys-root.  */
42c074d1c9Sdrahn   bfd_boolean sysrooted;
432159047fSniklas } search_dirs_type;
442159047fSniklas 
452159047fSniklas extern search_dirs_type *search_head;
462159047fSniklas 
47c074d1c9Sdrahn extern void ldfile_add_arch
48*007c2a45Smiod   (const char *);
49c074d1c9Sdrahn extern void ldfile_add_library_path
50*007c2a45Smiod   (const char *, bfd_boolean cmdline);
51c074d1c9Sdrahn extern void ldfile_open_command_file
52*007c2a45Smiod   (const char *name);
53c074d1c9Sdrahn extern void ldfile_open_file
54*007c2a45Smiod   (struct lang_input_statement_struct *);
55c074d1c9Sdrahn extern bfd_boolean ldfile_try_open_bfd
56*007c2a45Smiod   (const char *, struct lang_input_statement_struct *);
572159047fSniklas extern FILE *ldfile_find_command_file
58*007c2a45Smiod   (const char *name, const char *extend);
59c074d1c9Sdrahn extern void ldfile_set_output_arch
60*007c2a45Smiod   (const char *, enum bfd_architecture);
61c074d1c9Sdrahn extern bfd_boolean ldfile_open_file_search
62*007c2a45Smiod   (const char *arch, struct lang_input_statement_struct *,
63*007c2a45Smiod    const char *lib, const char *suffix);
64b55d4692Sfgsch 
65b55d4692Sfgsch #endif
66