CHRPATH(1)

πŸ“¦
version 0.18 Β· 2 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, debian trixie, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– CHRPATH β€” like, the manual page, bestie πŸ’–

okay so real talk, this is chrpath(1) β€” the little tool that goes "change rpath/runpath in binaries" and honestly? it's giving linker whisperer energy. if you've ever had a binary that just 😐 cannot find its libraries, this is your girl.


✨ SYNOPSIS ✨

chrpath [ -v | --version ] [ -d | --delete ] [ -r <path> |  --replace
<path> ] [ -c | --convert ] [ -l | --list ] [ -h | --help ] <program> [
<program> ... ]

like yes, that's a lot of brackets, but it's literally just "pick your vibe, then hand me one or more <program>s" 🫢


🌸 DESCRIPTION 🌸

so chrpath changes, lists or removes the rpath or runpath setting in a binary. periodt.

and what even is that? okay so the rpath β€” or the runpath if one is present β€” is literally where the runtime linker should look for the libraries needed for a program. it's the little map your binary hands to the dynamic linker like "bestie, the libs are over there" πŸ—ΊοΈβœ¨


πŸ‘‘ OPTIONS πŸ‘‘

  • -v | --version β€” display program version number. short, sweet, iconic.
  • -d | --delete β€” delete the current rpath or runpath setting. bye bye πŸ‘‹
  • -c | --convert β€” convert the rpath setting into a runpath setting. glow-up, but for ELF metadata πŸ’…
  • -r <path> | --replace <path> β€” replace the current rpath or runpath setting with the path given. ⚠️ the new path must be shorter or the same length as the current path β€” no growing, she can only shrink or stay exactly the same size, no cap.
  • -k | --keepgoing β€” do not fail on the first error, but process all arguments before returning the error. main character energy: she finishes the whole list before she complains 😀
  • -l | --list β€” list the current rpath or runpath. this is the default btw, so if you don't say anything, this is what you get πŸŽ€
  • -h | --help β€” show usage information. the classic.

πŸ’€ EXIT STATUS πŸ’€

  • 0 β€” if all operations were successful. slay. flawless. no notes. βœ…
  • >0 β€” if one of the operations failed. and heads up: a failing operation terminates the program unless -k is specified. so if you didn't pass -k, one oopsie and she's OUT πŸšͺπŸ’¨

πŸ› BUGS πŸ›

okay so the tea β˜• β€” there are two things this program genuinely can't do:

  • This program cannot create an RPATH tag if the ELF does not have one.
  • It can only replace an RPATH with one of equal or shorter length.

and why? because (and this is the actual reason, quoted-with-feeling): moving ELF sections following a lengthened string table would be difficult and error-prone at best, and is sometimes outright impossible due to issues like limited ranges in jump instructions. so like… yeah. she's not being lazy, the file format is just built different 🫠


πŸ’œ AUTHOR πŸ’œ

the chrpath program was written by Petter Reinholdtsen <pere@hungry.com>, based on works by Geoffrey Keating <geoffk@ozemail.com.au> and Peeter Joot <peeterjoot@protonmail.com>. legends, all of them πŸ‘‘

this manual page was originally written by Tollef Fog Heen <tfheen@debian.org>, for the Debian GNU/Linux system (but may be used by others β€” she's generous like that πŸ’–).


and that's the whole page, bestie!! 🌈 this is chrpath, from May 4, 2002, living in the chrpath source/version zone β€” old enough to be vintage, still out here doing the work. iykyk πŸ¦‹πŸ’…βœ¨