summaryrefslogtreecommitdiff
path: root/ld/ldmain.h
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2020-10-16 11:37:26 +0100
committerNick Clifton <nickc@redhat.com>2020-10-16 11:37:26 +0100
commit23ae20f5e3afeeab9aa616c63ab3b357668476d5 (patch)
tree77fe952d842fc8b8f4a0efccbc006686a3b05e77 /ld/ldmain.h
parent472d09c18a750f483ad974991f4f35ede3dfb10b (diff)
Add a new option to the linker: --error-handling-script=<NAME>. Run the script <NAME> if an undefined symbol or unfound library error is encountered.
PR 26626 * ldmain.c (undefined_symbol): If an error handlign script is available, call it. * ldfile.c (error_handling_script): Declare. (ldfile_open_file): If a library cannot be found and an error handling script is available, call it. * ldmain.h (error_handling_script): Prototype. * ldlex.h (OPTION_ERROR_HANDLING_SCRIPT): Define. * lexsup.c (ld_options): Add --error-handling-script. (parse_args): Add support for --errror-handling-script. * ld.texi: Document the new feature. * configure.ac: Add --error-handling-script option to disable support for the new feature. * NEWS: Mention the new feature. * config.in: Regenerate. * configure: Regenerate.
Diffstat (limited to 'ld/ldmain.h')
-rw-r--r--ld/ldmain.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/ld/ldmain.h b/ld/ldmain.h
index ac7db5720d..6863727473 100644
--- a/ld/ldmain.h
+++ b/ld/ldmain.h
@@ -37,6 +37,9 @@ extern int g_switch_value;
extern const char *output_filename;
extern struct bfd_link_info link_info;
extern int overflow_cutoff_limit;
+#if SUPPORT_ERROR_HANDLING_SCRIPT
+extern char *error_handling_script;
+#endif
#define RELAXATION_DISABLED_BY_DEFAULT \
(link_info.disable_target_specific_optimizations < 0)