From 0da60f625271b9122dad4c70d035af6b2d12f7b5 Mon Sep 17 00:00:00 2001 From: SeungSeop Park Date: Mon, 9 Feb 2015 18:56:20 +0900 Subject: [PATCH] Only export necessary symbols (EWK + v8::*) in libchromium-ewk.so Currently we are providing two shared libraries - libchromium-ewk.so and libchromium-efl.so, as the former is relying on the latter. Tizen applications are supposed to use only EWK api, hence would only see libchromium-ewk.so, which uses in turn libchromium-efl.so in implementing EWK. However, libchromium-efl.so is over-exporting symbols unnecessary to EWK apis, resulting in large ROM size and runtime memory. This patch does three things to fix above mentioned issues. 1. Change libchromium-efl to static library 2. export symbols required for EWK app and WRT in libchromium-ewk.so - ewk_ prefixed API - v8::* 3. Refactored efl_webprocess executable to link with libchromium-ewk.so. Test result of .so size in mobile: - Before: 46M after strip (76M before strip) - After : 35M after strip (63M before strip) The test result for runtime memory also showed over 8M reduction in PSS code section. Note: This is a partial commit of http://165.213.202.130:8080/#/c/75146/ which contains our effort to reduce memory footprint. Bug: http://web.sec.samsung.net/bugzilla/show_bug.cgi?id=11607 Reviewed by: Antonio Gomes, Piotr Tworek Change-Id: I527135ab844428d030477d194e5e5103c5533685 Signed-off-by: SeungSeop Park --- tizen_src/build/pkgconfig/chromium-efl.pc.in | 2 +- tizen_src/ewk/chromium-ewk.filter | 11 +++++++++ tizen_src/ewk/chromium-ewk.gyp | 25 ++++++++++++++++++++- tizen_src/ewk/efl_webprocess/efl_webprocess.cc | 9 ++++++++ tizen_src/impl/chromium-efl.filter | 20 ----------------- tizen_src/impl/chromium-efl.gyp | 26 +++------------------- .../{web_process.cc => efl_webprocess_main.cc} | 6 +++-- tizen_src/impl/efl_webprocess_main.h | 18 +++++++++++++++ tizen_src/packaging/chromium-efl.spec | 2 -- 9 files changed, 70 insertions(+), 49 deletions(-) create mode 100644 tizen_src/ewk/chromium-ewk.filter create mode 100644 tizen_src/ewk/efl_webprocess/efl_webprocess.cc delete mode 100644 tizen_src/impl/chromium-efl.filter rename tizen_src/impl/{web_process.cc => efl_webprocess_main.cc} (74%) create mode 100644 tizen_src/impl/efl_webprocess_main.h diff --git a/tizen_src/build/pkgconfig/chromium-efl.pc.in b/tizen_src/build/pkgconfig/chromium-efl.pc.in index 15c969d..1b9e0bc 100644 --- a/tizen_src/build/pkgconfig/chromium-efl.pc.in +++ b/tizen_src/build/pkgconfig/chromium-efl.pc.in @@ -7,5 +7,5 @@ Name: chromium-efl Description: Chromium EFL port Version: ?VERSION? -Libs: -L${libdir} -Wl,-rpath-link=${libdir} -lchromium-efl -lchromium-ewk +Libs: -L${libdir} -Wl,-rpath-link=${libdir} -lchromium-ewk Cflags: -I${includedir}/chromium-ewk -I${includedir}/v8 diff --git a/tizen_src/ewk/chromium-ewk.filter b/tizen_src/ewk/chromium-ewk.filter new file mode 100644 index 0000000..5d7ed9b --- /dev/null +++ b/tizen_src/ewk/chromium-ewk.filter @@ -0,0 +1,11 @@ +{ + global: + ewk_*; + efl_webprocess_main; + extern "C++" { + v8::* + }; + + local: *; +}; + diff --git a/tizen_src/ewk/chromium-ewk.gyp b/tizen_src/ewk/chromium-ewk.gyp index 89fd0f5..806a0d5 100644 --- a/tizen_src/ewk/chromium-ewk.gyp +++ b/tizen_src/ewk/chromium-ewk.gyp @@ -41,7 +41,6 @@ 'dependencies': [ '<(efl_impl_dir)/chromium-efl.gyp:chromium-efl', - '<(efl_impl_dir)/chromium-efl.gyp:efl_webprocess', '<(DEPTH)/chrome/chrome_resources.gyp:packed_resources', ], @@ -164,6 +163,16 @@ 'defines': [ 'HAVE_ECORE_X=