HACK: Replace out-dated deps

libffi.so.6 -> libffi.so
libcrypto.so.1.0.0 -> libcrypto.so

By ./normalize.sh

NOTE: It's not safe, only affect:
libmali-utgard-400-r7p0-r3p0-wayland.so(px3se)

Change-Id: I6b726c631b0c64fc29b13819e408801052bb54f9
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
This commit is contained in:
Jeffy Chen
2020-07-31 14:05:46 +08:00
parent 9853e61f05
commit f226c36d73
3 changed files with 19 additions and 0 deletions

19
normalize.sh Executable file
View File

@@ -0,0 +1,19 @@
#!/bin/sh
# Remove fbdev libs
rm -f $(find . -name "*fbdev*.so")
# Link x11 libs
X11_LIBS=$(find . -name "*.so"|grep -vE "gbm.so|wayland.so|x11.so|only-cl.so")
for lib in $X11_LIBS;do
mv $lib ${lib%.so}-x11.so 2>/dev/null
done
for lib in $(find . -name "*.so"|grep x11.so);do
ln -sf ${lib##*/} ${lib%-x11.so}.so
done
# Hack out-dated deps
for file in $(find . -type f);do
patchelf $file --replace-needed libffi.so.6 libffi.so
patchelf $file --replace-needed libcrypto.so.1.0.0 libcrypto.so
done 2>/dev/null

Binary file not shown.