Bug 46416 - trim list of exported symbols
Summary: trim list of exported symbols
Status: RESOLVED FIXED
Alias: None
Product: libxklavier
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Sergey V. Udaltsov
QA Contact: Sergey V. Udaltsov
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-21 12:41 UTC by Michael Biebl
Modified: 2012-02-21 17:24 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
list of exported symbols (7.41 KB, text/plain)
2012-02-21 12:41 UTC, Michael Biebl
Details
list of private symbols (2.97 KB, text/plain)
2012-02-21 12:42 UTC, Michael Biebl
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Biebl 2012-02-21 12:41:38 UTC
Created attachment 57418 [details]
list of exported symbols

Version: 5.2.1

Attached is the list of symbols as exported by libxklavier.so.16.

From those 195 symbols, 107 can not be found in the header files, i.e. they are private.
Please consider hiding those private symbols.
A simple approach could be to use libtools symbols regex [1], like

-export-symbols-regex '^(xkl_.*|_xkl_debug)'

and then name the private symbols _xkl_*

I've included _xkl_debug, as it seems to be exported in the API even if the name suggests otherwise.


[1] http://www.flameeyes.eu/autotools-mythbuster/libtool/symbols.html
Comment 1 Michael Biebl 2012-02-21 12:42:12 UTC
Created attachment 57419 [details]
list of private symbols
Comment 2 Sergey V. Udaltsov 2012-02-21 13:53:54 UTC
Thanks! It is committed now. Actually there are 3 more methods that have to exported, I've added them as well. But in general it is a good idea, should speed things up a bit...
Comment 3 Michael Biebl 2012-02-21 14:40:35 UTC
(In reply to comment #2)
> Thanks! It is committed now. Actually there are 3 more methods that have to
> exported, I've added them as well. But in general it is a good idea, should
> speed things up a bit...

Thanks for the speedy response.
I don't see the commits in the public git repo [1] though. Have you not yet pushed those changes?


[1] http://cgit.freedesktop.org/libxklavier/
Comment 4 Sergey V. Udaltsov 2012-02-21 17:01:51 UTC
It was not pushed at that point. Not it is there. Please check?
Comment 5 Michael Biebl 2012-02-21 17:19:09 UTC
(In reply to comment #4)
> It was not pushed at that point. Not it is there. Please check?

Looking much better now.

The only remaining discrepancy I found are the three symbols:

xkl_config_rec_dump
xkl_xkb_config_native_cleanup
xkl_xkb_config_native_prepare

Those symbols are exported but not part of the public API.
xkl_config_rec_dump seems to be used by tests/test_config.c.
But at least xkl_xkb_* look like they could be removed safely from libxklavier.public.
Comment 6 Sergey V. Udaltsov 2012-02-21 17:22:11 UTC
> But at least xkl_xkb_* look like they could be removed safely from
> libxklavier.public.
Unfortunately they cannot. They are used in libgnomekbd through "extern" definition, as non-documented functions. It is a shame, I know - but I could not come up with decent abstraction around that area...
Comment 7 Michael Biebl 2012-02-21 17:24:15 UTC
(In reply to comment #6)
> > But at least xkl_xkb_* look like they could be removed safely from
> > libxklavier.public.
> Unfortunately they cannot. They are used in libgnomekbd through "extern"
> definition, as non-documented functions. It is a shame, I know - but I could
> not come up with decent abstraction around that area...

Ok. Thanks a lot for the explanation and the really speedy solution!


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.