5 LLD provides the ability to hook into some error handling routines through a
6 user-provided script specified with ``--error-handling-script=<path to the script>``
7 when certain errors are encountered. This document specifies the requirements of
13 The script is expected to be available in the ``PATH`` or to be provided using a
14 full path. It must be executable. It is executed in the same environment as the
20 LLD calls the error handling script using the following arguments::
22 error-handling-script <tag> <tag-specific-arguments...>
24 The following tags are supported:
26 - ``missing-lib``: indicates that LLD failed to find a library. The library name
27 is specified as the second argument, e.g. ``error-handling-script missing-lib
30 - ``undefined-symbol``: indicates that given symbol is marked as undefined. The
31 unmangled symbol name is specified as the second argument, e.g.
32 ``error-handling-script undefined-symbol mysymbol``
37 Upon success, the script is expected to return 0. A non-zero value is
38 interpreted as an error and reported to the user. In both cases, LLD still
39 reports the original error.