CSEXEC(1)

πŸ“¦
version 2.2.6 Β· 3 versions
, in epel 10, epel 9, fedora 43, fedora 44

✨ 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