ldmain.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /* ldmain.h -
  2. Copyright (C) 1991-2022 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 bool force_make_executable;
  25. extern char *default_target;
  26. extern unsigned int trace_files;
  27. extern bool verbose;
  28. extern bool version_printed;
  29. extern bool 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. #if SUPPORT_ERROR_HANDLING_SCRIPT
  35. extern char *error_handling_script;
  36. #endif
  37. #define RELAXATION_DISABLED_BY_DEFAULT \
  38. (link_info.disable_target_specific_optimizations < 0)
  39. #define RELAXATION_DISABLED_BY_USER \
  40. (link_info.disable_target_specific_optimizations > 1)
  41. #define RELAXATION_ENABLED \
  42. (link_info.disable_target_specific_optimizations == 0 \
  43. || link_info.disable_target_specific_optimizations == 1)
  44. #define RELAXATION_ENABLED_BY_USER \
  45. (link_info.disable_target_specific_optimizations == 0)
  46. #define TARGET_ENABLE_RELAXATION \
  47. do { link_info.disable_target_specific_optimizations = 1; } while (0)
  48. #define DISABLE_RELAXATION \
  49. do { link_info.disable_target_specific_optimizations = 2; } while (0)
  50. #define ENABLE_RELAXATION \
  51. do { link_info.disable_target_specific_optimizations = 0; } while (0)
  52. extern void add_ysym (const char *);
  53. extern void add_wrap (const char *);
  54. extern void add_ignoresym (struct bfd_link_info *, const char *);
  55. extern void add_keepsyms_file (const char *);
  56. extern void track_dependency_files (const char *);
  57. #endif