Skip to content

Commit c246dae

Browse files
committed
* --interpreter' -> --set-interpreter'.
1 parent 07b8f23 commit c246dae

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ libraries. In particular, it can do the following:
33

44
* Change the dynamic loader ("ELF interpreter") of executables:
55

6-
$ patchelf --interpreter /lib/my-ld-linux.so.2 my-program
6+
$ patchelf --set-interpreter /lib/my-ld-linux.so.2 my-program
77

88
* Change the RPATH of executables and libraries:
99

src/patchelf.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ int main(int argc, char * * argv)
660660
{
661661
if (argc <= 1) {
662662
fprintf(stderr, "syntax: %s\n\
663-
[--interpreter FILENAME]\n\
663+
[--set-interpreter FILENAME]\n\
664664
[--print-interpreter]\n\
665665
[--set-rpath RPATH]\n\
666666
[--shrink-rpath]\n\
@@ -675,7 +675,7 @@ int main(int argc, char * * argv)
675675
int i;
676676
for (i = 1; i < argc; ++i) {
677677
string arg(argv[i]);
678-
if (arg == "--interpreter") {
678+
if (arg == "--set-interpreter" || arg == "--interpreter") {
679679
if (++i == argc) error("missing argument");
680680
newInterpreter = argv[i];
681681
}

tests/no-rpath.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ cp no-rpath scratch/
88
oldRPath=$(../src/patchelf --print-rpath scratch/no-rpath)
99
if test -n "$oldRPath"; then exit 1; fi
1010
../src/patchelf \
11-
--interpreter "$(../src/patchelf --print-interpreter ../src/patchelf)" \
11+
--set-interpreter "$(../src/patchelf --print-interpreter ../src/patchelf)" \
1212
--set-rpath /foo:/bar:/xxxxxxxxxxxxxxx scratch/no-rpath
1313

1414
newRPath=$(../src/patchelf --print-rpath scratch/no-rpath)

tests/set-interpreter-long.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ mkdir -p scratch
1010

1111
newInterpreter=$(pwd)/scratch/iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
1212
cp simple scratch/
13-
../src/patchelf --interpreter "$newInterpreter" scratch/simple
13+
../src/patchelf --set-interpreter "$newInterpreter" scratch/simple
1414

1515
echo "running with missing interpreter..."
1616
if scratch/simple; then

tests/set-interpreter-short.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ rm -rf scratch
99
mkdir -p scratch
1010

1111
cp simple scratch/
12-
../src/patchelf --interpreter /oops scratch/simple
12+
../src/patchelf --set-interpreter /oops scratch/simple
1313

1414
echo "running with missing interpreter..."
1515
if scratch/simple; then

0 commit comments

Comments
 (0)