1PATCHELF(1) User Manuals PATCHELF(1)
2
3
4
6 patchelf - Modify ELF files
7
8
10 patchelf OPTION FILE
11
12
14 PatchELF is a simple utility for modifying existing ELF executables and
15 libraries. It can change the dynamic loader ("ELF interpreter") of
16 executables and change the RPATH of executables and libraries.
17
18
20 The single option given operates on a given FILE, editing in place.
21
22
23 --set-interpreter INTERPRETER
24 Change the dynamic loader ("ELF interpreter") of executable
25 given to INTERPRETER
26
27
28 --print-intepreter
29 Prints the ELF interpreter of the executable
30
31
32 --set-rpath RPATH
33 Change the RPATH of the executable or library to RPATH
34
35
36 --shrink-rpath
37 Remove from the RPATH all directories that do not contain a
38 library referenced by DT_NEEDED fields of the executable or
39 library.
40
41 For instance, if an executable references one library libfoo.so,
42 has an RPATH "/lib:/usr/lib:/foo/lib", and libfoo.so can only be
43 found in /foo/lib, then the new RPATH will be "/foo/lib".
44
45
46 --print-rpath
47 Prints the RPATH for an executable or library
48
49
50 --force-rpath
51 Forces the use of the obsolete DT_RPATH in the file instead of
52 DT_RUNPATH. By default DT_RPATH is converted to DT_RUNPATH.
53
54
55 --debug
56 Prints details of the changes made to the input file
57
58
59 --version
60 Shows the version of patchelf
61
62
64 Eelco Dolstra <e.dolstra@tudelft.nl>
65
66
68 elf(5), ld.so(8)
69
70
71
72
73
74PATCHELF JUNE 2010 PATCHELF(1)