aboutsummaryrefslogtreecommitdiff
path: root/ld/ld.texi
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/ld.texi
parent472d09c18a750f483ad974991f4f35ede3dfb10b (diff)
downloadgdb-23ae20f5e3afeeab9aa616c63ab3b357668476d5.zip
gdb-23ae20f5e3afeeab9aa616c63ab3b357668476d5.tar.gz
gdb-23ae20f5e3afeeab9aa616c63ab3b357668476d5.tar.bz2
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/ld.texi')
-rw-r--r--ld/ld.texi15
1 files changed, 15 insertions, 0 deletions
diff --git a/ld/ld.texi b/ld/ld.texi
index 66bede2..95f31ea 100644
--- a/ld/ld.texi
+++ b/ld/ld.texi
@@ -1923,6 +1923,21 @@ architecture. This is used, for example, to dynamically select an
appropriate memset function.
@end itemize
+@kindex --error-handling-script=@var{scriptname}
+@item --error-handling-script=@var{scriptname}
+If this option is provided then the linker will invoke
+@var{scriptname} whenever an error is encountered. Currently however
+only two kinds of error are supported: missing symbols and missing
+libraries. Two arguments will be passed to script: the keyword
+``missing-symbol'' or `missing-lib'' and the @var{name} of the
+missing symbol or library. The intention is that the script will
+provide suggestions to the user as to where the symbol or library
+might be found. After the script has finished then the normal linker
+error message will be displayed.
+
+The availability of this option is controlled by a configure time
+switch, so it may not be present in specific implementations.
+
@kindex --no-undefined-version
@item --no-undefined-version
Normally when a symbol has an undefined version, the linker will ignore