X-Git-Url: http://git.ozo.com/?a=blobdiff_plain;f=scripts%2Frstrip.sh;h=59f8624df209baaa286d54d50fcd0d39848d8b48;hb=HEAD;hp=4e4232db60d6b67689c70ca36568d7790b006714;hpb=2efe776ab082723fe94e91ae7d45e65480bb3faa;p=openwrt%2F.git diff --git a/scripts/rstrip.sh b/scripts/rstrip.sh index 4e4232db60..59f8624df2 100755 --- a/scripts/rstrip.sh +++ b/scripts/rstrip.sh @@ -21,7 +21,7 @@ TARGETS=$* } find $TARGETS -type f -a -exec file {} \; | \ - sed -n -e 's/^\(.*\):.*ELF.*\(executable\|relocatable\|shared object\).*,.* stripped/\1:\2/p' | \ + sed -n -e 's/^\(.*\):.*ELF.*\(executable\|relocatable\|shared object\).*,.*/\1:\2/p' | \ ( IFS=":" while read F S; do @@ -34,7 +34,7 @@ find $TARGETS -type f -a -exec file {} \; | \ old_rpath="$($PATCHELF --print-rpath $F)"; new_rpath="" for path in $old_rpath; do case "$path" in - /lib/[^/]*|/usr/lib/[^/]*|\$ORIGIN/*) new_rpath="${new_rpath:+$new_rpath:}$path" ;; + /lib/[^/]*|/usr/lib/[^/]*|\$ORIGIN/*|\$ORIGIN) new_rpath="${new_rpath:+$new_rpath:}$path" ;; *) echo "$SELF: $F: removing rpath $path" ;; esac done