[Nix-dev] patchelf
Eelco Dolstra
eelco at cs.uu.nl
Mon Nov 29 17:54:08 CET 2004
On Mon, 29 Nov 2004 17:41:22 +0100
Armijn Hemel <armijn at uulug.nl> wrote:
> regarding the glibc problem, I figured that out (statically linked glibc
> gets stored under another prefix as it was being built under). Now, the
> solution is to rewrite all binaries and libs with patchelf.
>
> Is there an easy way with patchelf do just rewrite everything? I mean, I
> don't want to find out first if everything is in fact an ELF executable
> or a symlink, I just want to use something like find or whatever and rewrite
> all necessary files, without too much tinkering :)
>From stdenv/generic/setup.sh:
patchELF() {
# Patch all ELF executables and shared libraries.
header "patching ELF executables and libraries"
find "$prefix" \( -name "*.so*" -o \
\( -type f -a -perm +0100 \) \
\) -exec patchelf --shrink-rpath {} \;
stopNest
}
Note that patchelf skips things that aren't ELF images.
--
Eelco Dolstra | http://www.cs.uu.nl/~eelco
More information about the nix-dev
mailing list