[Android] libvlc.so: export only the libvlc symbols

Jean-Baptiste Kempf git at videolan.org
Fri Sep 25 18:48:58 CEST 2015


vlc-ports/android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Fri Sep 25 18:45:45 2015 +0200| [e93ca17f683c0bb43d6747f8c812f6265fd8926c] | committer: Jean-Baptiste Kempf

libvlc.so: export only the libvlc symbols

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=e93ca17f683c0bb43d6747f8c812f6265fd8926c
---

 compile-libvlc.sh |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/compile-libvlc.sh b/compile-libvlc.sh
index 83adbaf..dd51122 100755
--- a/compile-libvlc.sh
+++ b/compile-libvlc.sh
@@ -618,6 +618,14 @@ BUILTINS="$BUILTINS NULL\n};\n"; \
 printf "/* Autogenerated from the list of modules */\n$DEFINITION\n$BUILTINS\n" > libvlc/jni/libvlcjni-modules.h
 rm ${REDEFINED_VLC_MODULES_DIR}/syms
 
+# Generating the .ver file like libvlc.so upstream
+VER_FILE="vlc/$VLC_BUILD_DIR/lib/.libs/libvlc.ver"
+echo "{ global:" > $VER_FILE
+cat vlc/lib/libvlc.sym | sed -e "s/\(.*\)/\1;/" >> $VER_FILE
+echo "local: *; };" >> $VER_FILE
+pwd
+echo $VER_FILE
+
 ###############################
 # NDK-Build for libvlcjni.so  #
 ###############################
@@ -650,7 +658,7 @@ $ANDROID_NDK/ndk-build -C libvlc \
     VLC_CONTRIB="$VLC_CONTRIB" \
     VLC_MODULES="$VLC_MODULES" \
     TARGET_CFLAGS="$EXTRA_CFLAGS" \
-    EXTRA_LDFLAGS="$EXTRA_LDFLAGS" \
+    EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-soname -Wl,libvlc.so.5 -Wl,-version-script -Wl,$SRC_DIR/$VER_FILE" \
     LIBVLC_LIBS="$LIBVLC_LIBS" \
     LIBIOMX_LIBS="$LIBIOMX_LIBS" \
     LIBANW_LIBS="$LIBANW_LIBS" \



More information about the Android mailing list