175fd0b74Schristos /* pe-dll.h: Header file for routines used to build Windows DLLs. 2*e992f068Schristos Copyright (C) 1999-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 PE_DLL_H 2275fd0b74Schristos #define PE_DLL_H 2375fd0b74Schristos 2475fd0b74Schristos #include "sysdep.h" 2575fd0b74Schristos #include "bfd.h" 2675fd0b74Schristos #include "bfdlink.h" 2775fd0b74Schristos #include "deffile.h" 2875fd0b74Schristos 2975fd0b74Schristos extern def_file *pe_def_file; 3075fd0b74Schristos extern int pe_dll_export_everything; 3175fd0b74Schristos extern int pe_dll_exclude_all_symbols; 3275fd0b74Schristos extern int pe_dll_do_default_excludes; 3375fd0b74Schristos extern int pe_dll_kill_ats; 3475fd0b74Schristos extern int pe_dll_stdcall_aliases; 3575fd0b74Schristos extern int pe_dll_warn_dup_exports; 3675fd0b74Schristos extern int pe_dll_compat_implib; 3775fd0b74Schristos extern int pe_dll_extra_pe_debug; 3875fd0b74Schristos extern int pe_use_nul_prefixed_import_tables; 3975fd0b74Schristos extern int pe_use_coff_long_section_names; 4075fd0b74Schristos extern int pe_leading_underscore; 41012573ebSchristos extern int pe_dll_enable_reloc_section; 4275fd0b74Schristos 4375fd0b74Schristos typedef enum { EXCLUDESYMS, EXCLUDELIBS, EXCLUDEFORIMPLIB } exclude_type; 4475fd0b74Schristos 4575fd0b74Schristos extern void pe_dll_id_target 4675fd0b74Schristos (const char *); 4775fd0b74Schristos extern void pe_dll_add_excludes 4875fd0b74Schristos (const char *, const exclude_type); 4975fd0b74Schristos extern void pe_dll_generate_def_file 5075fd0b74Schristos (const char *); 5175fd0b74Schristos extern void pe_dll_generate_implib 5275fd0b74Schristos (def_file *, const char *, struct bfd_link_info *); 5375fd0b74Schristos extern void pe_process_import_defs 5475fd0b74Schristos (bfd *, struct bfd_link_info *); 55*e992f068Schristos extern bool pe_implied_import_dll 5675fd0b74Schristos (const char *); 5775fd0b74Schristos extern void pe_dll_build_sections 5875fd0b74Schristos (bfd *, struct bfd_link_info *); 5975fd0b74Schristos extern void pe_exe_build_sections 6075fd0b74Schristos (bfd *, struct bfd_link_info *); 6175fd0b74Schristos extern void pe_dll_fill_sections 6275fd0b74Schristos (bfd *, struct bfd_link_info *); 6375fd0b74Schristos extern void pe_exe_fill_sections 6475fd0b74Schristos (bfd *, struct bfd_link_info *); 65ede78133Schristos extern void pe_find_data_imports 66ede78133Schristos (const char *, void (*cb) (arelent *, asection *, char *, const char *)); 6775fd0b74Schristos extern void pe_create_import_fixup 68ede78133Schristos (arelent * rel, asection *, bfd_vma, char *, const char *); 69*e992f068Schristos extern bool pe_bfd_is_dll 7075fd0b74Schristos (bfd *); 7175fd0b74Schristos extern void pe_output_file_set_long_section_names 7275fd0b74Schristos (bfd *); 7375fd0b74Schristos 7475fd0b74Schristos #endif /* PE_DLL_H */ 75