1*fae548d3Szrj /* ldmain.h - 2*fae548d3Szrj Copyright (C) 1991-2020 Free Software Foundation, Inc. 3*fae548d3Szrj 4*fae548d3Szrj This file is part of the GNU Binutils. 5*fae548d3Szrj 6*fae548d3Szrj This program is free software; you can redistribute it and/or modify 7*fae548d3Szrj it under the terms of the GNU General Public License as published by 8*fae548d3Szrj the Free Software Foundation; either version 3 of the License, or 9*fae548d3Szrj (at your option) any later version. 10*fae548d3Szrj 11*fae548d3Szrj This program is distributed in the hope that it will be useful, 12*fae548d3Szrj but WITHOUT ANY WARRANTY; without even the implied warranty of 13*fae548d3Szrj MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14*fae548d3Szrj GNU General Public License for more details. 15*fae548d3Szrj 16*fae548d3Szrj You should have received a copy of the GNU General Public License 17*fae548d3Szrj along with this program; if not, write to the Free Software 18*fae548d3Szrj Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, 19*fae548d3Szrj MA 02110-1301, USA. */ 20*fae548d3Szrj 21*fae548d3Szrj #ifndef LDMAIN_H 22*fae548d3Szrj #define LDMAIN_H 23*fae548d3Szrj 24*fae548d3Szrj extern char *program_name; 25*fae548d3Szrj extern const char *ld_sysroot; 26*fae548d3Szrj extern char *ld_canon_sysroot; 27*fae548d3Szrj extern int ld_canon_sysroot_len; 28*fae548d3Szrj extern FILE *saved_script_handle; 29*fae548d3Szrj extern FILE *previous_script_handle; 30*fae548d3Szrj extern bfd_boolean force_make_executable; 31*fae548d3Szrj extern char *default_target; 32*fae548d3Szrj extern unsigned int trace_files; 33*fae548d3Szrj extern bfd_boolean verbose; 34*fae548d3Szrj extern bfd_boolean version_printed; 35*fae548d3Szrj extern bfd_boolean demangling; 36*fae548d3Szrj extern int g_switch_value; 37*fae548d3Szrj extern const char *output_filename; 38*fae548d3Szrj extern struct bfd_link_info link_info; 39*fae548d3Szrj extern int overflow_cutoff_limit; 40*fae548d3Szrj 41*fae548d3Szrj #define RELAXATION_DISABLED_BY_DEFAULT \ 42*fae548d3Szrj (link_info.disable_target_specific_optimizations < 0) 43*fae548d3Szrj #define RELAXATION_DISABLED_BY_USER \ 44*fae548d3Szrj (link_info.disable_target_specific_optimizations > 1) 45*fae548d3Szrj #define RELAXATION_ENABLED \ 46*fae548d3Szrj (link_info.disable_target_specific_optimizations == 0 \ 47*fae548d3Szrj || link_info.disable_target_specific_optimizations == 1) 48*fae548d3Szrj #define RELAXATION_ENABLED_BY_USER \ 49*fae548d3Szrj (link_info.disable_target_specific_optimizations == 0) 50*fae548d3Szrj #define TARGET_ENABLE_RELAXATION \ 51*fae548d3Szrj do { link_info.disable_target_specific_optimizations = 1; } while (0) 52*fae548d3Szrj #define DISABLE_RELAXATION \ 53*fae548d3Szrj do { link_info.disable_target_specific_optimizations = 2; } while (0) 54*fae548d3Szrj #define ENABLE_RELAXATION \ 55*fae548d3Szrj do { link_info.disable_target_specific_optimizations = 0; } while (0) 56*fae548d3Szrj 57*fae548d3Szrj extern void add_ysym (const char *); 58*fae548d3Szrj extern void add_wrap (const char *); 59*fae548d3Szrj extern void add_ignoresym (struct bfd_link_info *, const char *); 60*fae548d3Szrj extern void add_keepsyms_file (const char *); 61*fae548d3Szrj 62*fae548d3Szrj #endif 63