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