RESOLVED FIXED Bug 181433
[GTK] Missing symbols exported in 2.19.4
https://bugs.webkit.org/show_bug.cgi?id=181433
Summary [GTK] Missing symbols exported in 2.19.4
Carlos Garcia Campos
Reported 2018-01-09 05:19:26 PST
Berto has just reported that some symbols are no longer exported in 2.19.4, see: - webkit_authentication_dialog_get_type@Base 2.5.3 +#MISSING: 2.19.4-1# webkit_authentication_dialog_get_type@Base 2.5.3 - webkit_dom_dom_window_webkit_message_handlers_post_message@Base 2.8.1 +#MISSING: 2.19.4-1# webkit_dom_dom_window_webkit_message_handlers_post_message@Base 2.8.1 - webkit_inspector_window_get_type@Base 2.17.3 +#MISSING: 2.19.4-1# webkit_inspector_window_get_type@Base 2.17.3 - webkit_web_view_base_accessible_get_type@Base 2.5.3 +#MISSING: 2.19.4-1# webkit_web_view_base_accessible_get_type@Base 2.5.3 These are symbols were we forgot to add WEBKIT_API macros, but were always exported before by the filter script (webkit_*) There are others affected by this, but because we never wanted to expose them: - webkit_media_src_get_type@Base 2.19.3-2~ +#MISSING: 2.19.4-1# webkit_media_src_get_type@Base 2.19.3-2~ - webkit_mse_debug@Base 2.19.3-2~ +#MISSING: 2.19.4-1# webkit_mse_debug@Base 2.19.3-2~ - (optional)webkit_soup_request_generic_get_type@Base 2.5.3 - (optional)webkit_soup_request_input_stream_get_type@Base 2.5.3 +#MISSING: 2.19.4-1# (optional)webkit_soup_request_generic_get_type@Base 2.5.3 +#MISSING: 2.19.4-1# (optional)webkit_soup_request_input_stream_get_type@Base 2.5.3 - webkit_web_src_get_type@Base 2.5.3 +#MISSING: 2.19.4-1# webkit_web_view_base_accessible_get_type@Base 2.5.3 So, we should make the filter script work again, add the missing WEBKIT_API and stop exposing private symbols even when using the filter script.
Attachments
Patch (1.43 KB, patch)
2018-01-09 06:04 PST, Carlos Garcia Campos
mcatanzaro: review+
Carlos Garcia Campos
Comment 1 2018-01-09 05:21:20 PST
Michael, could it be that when using hidden visibility the filter is script is not used?
Carlos Garcia Campos
Comment 2 2018-01-09 05:49:17 PST
I've checked that using hidden visiblity takes precedence. This is actually a good thing, because it means that only webkit_ symbols will be exported thanks to the filter script, but also that webkit_ symbols not marked as public will not be exported either. So, we only need to add the missing WEBKIT_API macros.
Carlos Garcia Campos
Comment 3 2018-01-09 05:56:57 PST
Just in case you are curious, this is my experiment: test.c int __attribute__((visibility("default"))) p_foo() { return 1; } int bar() { return 2; } int __attribute__((visibility("default"))) exported() { return 3; } int __attribute__((visibility("default"))) p_bar() { return 4; } int p_baz() { return 5; } filter { global: p_*; local: *; }; $ gcc test.c -Wl,--version-script=filter -fPIC -shared -o libtest.so 0000000000000555 l F .text 000000000000000b bar 0000000000000560 l F .text 000000000000000b exported 000000000000054a g F .text 000000000000000b p_foo 000000000000056b g F .text 000000000000000b p_bar 0000000000000576 g F .text 000000000000000b p_baz Only p_ symbols are exported, as set in the version script, no matter what mark they have in the code. $ gcc test.c -fvisibility=hidden -fPIC -shared -o libtest.so 0000000000000615 l F .text 000000000000000b bar 0000000000000636 l F .text 000000000000000b p_baz 000000000000060a g F .text 000000000000000b p_foo 0000000000000620 g F .text 000000000000000b exported 000000000000062b g F .text 000000000000000b p_bar Only symbols marked as public in the code are exported. $ gcc test.c -Wl,--version-script=filter -fvisibility=hidden -fPIC -shared -o libtest.so 0000000000000535 l F .text 000000000000000b bar 0000000000000540 l F .text 000000000000000b exported 0000000000000556 l F .text 000000000000000b p_baz 000000000000052a g F .text 000000000000000b p_foo 000000000000054b g F .text 000000000000000b p_bar Only symbols with p_ prefix and marked as public in the code are exported. Which is exactly what we want in WebKit :-)
Carlos Garcia Campos
Comment 4 2018-01-09 06:01:27 PST
Only webkit_dom_dom_window_webkit_message_handlers_post_message() is meant to be public and is missing the WEBKIT_API, not exposing all others now is actually and improvement, not a bug. It shouldn't break any application, and it's not an ABI break because those have always been private even exported.
Carlos Garcia Campos
Comment 5 2018-01-09 06:04:43 PST
Carlos Garcia Campos
Comment 6 2018-01-09 06:05:12 PST
webkit_dom_dom_window_webkit_message_handlers_post_message(9 is used by ephy, so I'll have to make another release when this patch lands.
EWS Watchlist
Comment 7 2018-01-09 06:07:37 PST
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Michael Catanzaro
Comment 8 2018-01-09 06:44:30 PST
Comment on attachment 330816 [details] Patch Yes, this is caused by -fvisibility=hidden.
Michael Catanzaro
Comment 9 2018-01-09 06:46:24 PST
Carlos, in the linker version script, Source/WebKit/webkitglib-symbols.map, please remove line 13: webkit_media_player_debug; There's no point in having it anymore since it is not marked with WEBKIT_API. I didn't consider that when modifying the script.
Carlos Garcia Campos
Comment 10 2018-01-09 07:53:49 PST
Note You need to log in before you can comment on or make changes to this bug.