1CSEXEC(1) CSEXEC(1)
2
3
4
6 csexec - dynamic linker wrapper
7
9 csexec --help | --print-ld-exec-cmd [argv0]
10
12 csexec is a wrapper of the system dynamic linker which helps to run
13 dynamic analyzers and formal verifiers on unmodified source RPM
14 packages fully automatically. The wrapper needs to be enabled while
15 linking binaries using cswrap and csexec-loader:
16
17 $ export PATH="$(cswrap --print-path-to-wrap):$PATH"
18 $ export CSWRAP_ADD_CFLAGS=-Wl,--dynamic-linker,/usr/bin/csexec-loader
19
20 The dynamic analysis tool can be specified at run-time with the
21 CSEXEC_WRAP_CMD environment variable, as in the following example:
22
23 $ export CSEXEC_WRAP_CMD=$'valgrind\a--quiet\a--log-file=/dev/tty\a--leak-check=full'
24
25 Then the instrumented binaries will automatically launch the specified
26 analyzer for themselves each time they are executed.
27
29 --help
30 Print basic usage information.
31
32 --print-ld-exec-cmd [argv0]
33 Print a command prefix that can be used to invoke dynamic linker
34 explicitly.
35
37 Non-zero exit status is returned when csexec fails to execute the
38 binary. Otherwise the analyzer (or the binary itself) determines the
39 exit status.
40
42 CSEXEC_WRAP_CMD
43 If set to a non-empty string, csexec prepends the command to be
44 executed with the specified program (analyzer). The program name
45 can be optionally followed by a list of custom arguments for the
46 analyzer, each of them separated by the BEL character. If the value
47 of ${CSEXEC_WRAP_CMD} starts with --skip-ld-linux followed by BEL,
48 csexec does not explicitly invoke the system dynamic linker and it
49 exports the ${CSEXEC_ARGV0} environment variable with the desired
50 value of argv0 (because shebang-executed shell scripts cannot
51 easily access it by other means).
52
54 Please report bugs and feature requests at
55 https://github.com/csutils/cswrap.
56
58 Written by Kamil Dudka.
59
61 Copyright (C) 2020-2022 Red Hat, Inc. Free use of this software is
62 granted under the terms of the GNU General Public License (GPL). See
63 the COPYING file for details.
64
65
66
67 07/19/2023 CSEXEC(1)