[Webkit-unassigned] [Bug 181433] [GTK] Missing symbols exported in 2.19.4
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jan 9 05:56:57 PST 2018
https://bugs.webkit.org/show_bug.cgi?id=181433
--- Comment #3 from Carlos Garcia Campos <cgarcia at igalia.com> ---
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 :-)
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180109/25cceb82/attachment.html>
More information about the webkit-unassigned
mailing list