brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 53efa8b Raw
40 lines · plain
1=====================2Error Handling Script3=====================4 5LLD provides the ability to hook into some error handling routines through a6user-provided script specified with ``--error-handling-script=<path to the script>``7when certain errors are encountered. This document specifies the requirements of8such a script.9 10Generic Requirements11====================12 13The script is expected to be available in the ``PATH`` or to be provided using a14full path. It must be executable. It is executed in the same environment as the15parent process.16 17Arguments18=========19 20LLD calls the error handling script using the following arguments::21 22    error-handling-script <tag> <tag-specific-arguments...>23 24The following tags are supported:25 26- ``missing-lib``: indicates that LLD failed to find a library. The library name27  is specified as the second argument, e.g. ``error-handling-script missing-lib28  mylib``29 30- ``undefined-symbol``: indicates that given symbol is marked as undefined. The31  unmangled symbol name is specified as the second argument, e.g.32  ``error-handling-script undefined-symbol mysymbol``33 34Return Value35============36 37Upon success, the script is expected to return 0. A non-zero value is38interpreted as an error and reported to the user. In both cases, LLD still39reports the original error.40