CSEXEC(1)
β¨ csexec(1) β the dynamic linker wrapper that's literally your bestie β¨
okay so bestie, sit down, hydrate, and let me tell you about csexec β it's a manual page, it's section 1, and it's about to change your whole linking situation π
πΈ NAME πΈ
csexec β dynamic linker wrapper. that's it, that's the whole vibe. a wrapper. for the dynamic linker. iconic behavior honestly.
π SYNOPSIS π
csexec --help | --print-ld-exec-cmd [argv0]
π¦ DESCRIPTION π¦
so csexec is a wrapper around the system dynamic linker, and its whole thing β its main character energy, if you will β is helping you run dynamic analyzers and formal verifiers on unmodified source RPM packages fully automatically β¨ no cap.
but here's the tea π: the wrapper has to be enabled while you're linking binaries, and you do that using cswrap and csexec-loader. like so:
$ export PATH="$(cswrap --print-path-to-wrap):$PATH"
$ export CSWRAP_ADD_CFLAGS=-Wl,--dynamic-linker,/usr/bin/csexec-loader
and then!! the dynamic analysis tool itself can be picked at run-time with the CSEXEC_WRAP_CMD environment variable, like this:
$ export CSEXEC_WRAP_CMD=$'valgrind\a--quiet\a--log-file=/dev/tty\a--leak-check=full'
and after all that?? the instrumented binaries will automatically launch the analyzer you specified for themselves every single time they get executed π it's giving self-sufficient. it's giving independent. we love a binary that handles its own business π«Ά
β¨ OPTIONS β¨
--helpβ prints the basic usage info. your lil "what do i do now" button π--print-ld-exec-cmd [argv0]β prints a command prefix you can use to invoke the dynamic linker explicitly. yep,[argv0]is optional, and yes it matters.
π EXIT STATUS π
if csexec fails to execute the binary, you get a non-zero exit status. that's the fail case, bestie, no sugarcoating it.
but if it doesn't fail? then the exit status is decided by the analyzer (or by the binary itself). so basically not csexec's problem anymore at that point π periodt.
π ENVIRONMENT VARIABLES π
π CSEXEC_WRAP_CMD
if this is set to a non-empty string, then csexec prepends the command it's about to execute with the program you specified β that's your analyzer, queen π.
the program name can optionally be followed by a list of custom arguments for the analyzer, and each one of those gets separated by the BEL character. (yes, BEL. the little \a guy. he's working hard out here π₯)
and there's a lil special case you need to know about, so listen up π§: if the value of ${CSEXEC_WRAP_CMD} starts with --skip-ld-linux followed by BEL, then csexec does not explicitly invoke the system dynamic linker, and instead it exports the ${CSEXEC_ARGV0} environment variable with the value of argv0 that you wanted. why? because shebang-executed shell scripts can't easily access it any other way π she's doing her best, okay??
π BUGS π
found a bug? want a feature? please report it at:
https://github.com/csutils/cswrap
we're not gonna be weird about it, just tell us π«Ά
π AUTHOR π
written by Kamil Dudka. yes, that's the whole author section. respect the name, bestie π
π COPYING π
Copyright (C) 2020-2022 Red Hat, Inc. Free use of this software is granted under the terms of the GNU General Public License (GPL). see the COPYING file for the deets β the actual deets, not my summary of the deets β¨
and that's the whole page, babe π this was csexec(1) from the 06/29/2026 edition of the manual β now go forth and wrap some linkers, you absolute icon π
π¦ where this page comes from
- epel 10: csexec 2.2.6-1.el10_3 Β· GPL-3.0-or-later
- epel 9: csexec 2.2.6-1.el9 Β· GPLv3+
- fedora 43: csexec 2.2.6-1.fc43 Β· GPL-3.0-or-later
- fedora 44: csexec 2.2.6-1.fc44 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms