Limit exported symbols
Symbols from static libraries included in dynamic libraries are exported from
the dynamic library by default, and the usual "-Wl,--exclude-libs,ALL" doesn't
work for 64-bit libraries, so use a version script instead to ensure we only
export the necessary symbols.
This prevents applications from accessing the libraries outside of the
provided API, and reduces total size of extractor libraries by over 20%.
Test: build, run
Change-Id: I0aa1bd5fdc638960e66f59c867731a0aad255896
diff --git a/media/extractors/mpeg2/Android.bp b/media/extractors/mpeg2/Android.bp
index 50f740b..c6bb40d 100644
--- a/media/extractors/mpeg2/Android.bp
+++ b/media/extractors/mpeg2/Android.bp
@@ -41,6 +41,7 @@
"-Wall",
"-fvisibility=hidden",
],
+ version_script: "exports.lds",
sanitize: {
cfi: true,