opnsense-src/contrib/llvm-project/lld/docs/error_handling_script.rst
Dimitry Andric e8d8bef961 Merge llvm-project main llvmorg-12-init-17869-g8e464dd76bef
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-12-init-17869-g8e464dd76bef, the last commit before the
upstream release/12.x branch was created.

PR:		255570
MFC after:	6 weeks
2021-06-13 21:37:19 +02:00

39 lines
1.3 KiB
ReStructuredText

=====================
Error Handling Script
=====================
LLD provides the ability to hook into some error handling routines through a
user-provided script specified with ``--error-handling-script=<path to the script>``
when certain errors are encountered. This document specifies the requirements of
such a script.
Generic Requirements
====================
The script is expected to be available in the ``PATH`` or to be provided using a
full path. It must be executable. It is executed in the same environment as the
parent process.
Arguments
=========
LLD calls the error handling script using the following arguments::
error-handling-script <tag> <tag-specific-arguments...>
The following tags are supported:
- ``missing-lib``: indicates that LLD failed to find a library. The library name
is specified as the second argument, e.g. ``error-handling-script missing-lib
mylib``
- ``undefined-symbol``: indicates that given symbol is marked as undefined. The
unmangled symbol name is specified as the second argument, e.g.
``error-handling-script undefined-symbol mysymbol``
Return Value
============
Upon success, the script is expected to return 0. A non-zero value is
interpreted as an error and reported to the user. In both cases, LLD still
reports the original error.