From 6c9e0246a1fa902fdf5de2d95bc8cfeee851b355 Mon Sep 17 00:00:00 2001 From: conao3 Date: Mon, 5 Jan 2026 03:32:53 +0900 Subject: [PATCH] readme: document --add-rpath option --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index ecc11cae..d8d217cc 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,16 @@ libraries. In particular, it can do the following: $ patchelf --set-rpath /opt/my-libs/lib:/other-libs my-program ``` +* Add a directory to the `RPATH`: + + ```console + $ patchelf --add-rpath /opt/my-libs/lib my-program + ``` + + This appends the specified directory to the existing `RPATH` of the + executable or library. Unlike `--set-rpath`, this preserves any + existing `RPATH` entries. + * Shrink the `RPATH` of executables and libraries: ```console