xref: /netbsd-src/external/gpl3/binutils.old/dist/ld/ldfile.h (revision e992f068c547fd6e84b3f104dc2340adcc955732)
175fd0b74Schristos /* ldfile.h -
2*e992f068Schristos    Copyright (C) 1991-2022 Free Software Foundation, Inc.
375fd0b74Schristos 
475fd0b74Schristos    This file is part of the GNU Binutils.
575fd0b74Schristos 
675fd0b74Schristos    This program is free software; you can redistribute it and/or modify
775fd0b74Schristos    it under the terms of the GNU General Public License as published by
875fd0b74Schristos    the Free Software Foundation; either version 3 of the License, or
975fd0b74Schristos    (at your option) any later version.
1075fd0b74Schristos 
1175fd0b74Schristos    This program is distributed in the hope that it will be useful,
1275fd0b74Schristos    but WITHOUT ANY WARRANTY; without even the implied warranty of
1375fd0b74Schristos    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1475fd0b74Schristos    GNU General Public License for more details.
1575fd0b74Schristos 
1675fd0b74Schristos    You should have received a copy of the GNU General Public License
1775fd0b74Schristos    along with this program; if not, write to the Free Software
1875fd0b74Schristos    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
1975fd0b74Schristos    MA 02110-1301, USA.  */
2075fd0b74Schristos 
2175fd0b74Schristos #ifndef LDFILE_H
2275fd0b74Schristos #define LDFILE_H
2375fd0b74Schristos 
24*e992f068Schristos extern bool ldfile_assumed_script;
2575fd0b74Schristos extern unsigned long ldfile_output_machine;
2675fd0b74Schristos extern enum bfd_architecture ldfile_output_architecture;
2775fd0b74Schristos extern const char *ldfile_output_machine_name;
2875fd0b74Schristos 
2975fd0b74Schristos /* Structure used to hold the list of directories to search for
3075fd0b74Schristos    libraries.  */
3175fd0b74Schristos 
3275fd0b74Schristos typedef struct search_dirs {
3375fd0b74Schristos   /* Next directory on list.  */
3475fd0b74Schristos   struct search_dirs *next;
3575fd0b74Schristos   /* Name of directory.  */
3675fd0b74Schristos   const char *name;
3775fd0b74Schristos   /* TRUE if this is from the command line.  */
38*e992f068Schristos   bool cmdline;
3975fd0b74Schristos } search_dirs_type;
4075fd0b74Schristos 
4175fd0b74Schristos extern search_dirs_type *search_head;
4275fd0b74Schristos 
4375fd0b74Schristos extern void ldfile_add_arch
4475fd0b74Schristos   (const char *);
4575fd0b74Schristos extern void ldfile_add_library_path
46*e992f068Schristos   (const char *, bool cmdline);
4775fd0b74Schristos extern void ldfile_open_command_file
4875fd0b74Schristos   (const char *name);
49012573ebSchristos extern void ldfile_open_script_file
50012573ebSchristos   (const char *name);
5175fd0b74Schristos extern void ldfile_open_default_command_file
5275fd0b74Schristos   (const char *name);
5375fd0b74Schristos extern void ldfile_open_file
5475fd0b74Schristos   (struct lang_input_statement_struct *);
55*e992f068Schristos extern bool ldfile_try_open_bfd
5675fd0b74Schristos   (const char *, struct lang_input_statement_struct *);
5775fd0b74Schristos extern void ldfile_set_output_arch
5875fd0b74Schristos   (const char *, enum bfd_architecture);
59*e992f068Schristos extern bool ldfile_open_file_search
6075fd0b74Schristos   (const char *arch, struct lang_input_statement_struct *,
6175fd0b74Schristos    const char *lib, const char *suffix);
6275fd0b74Schristos 
6375fd0b74Schristos #endif
64