ldmain.h 2.3 KB

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