Bug 46416

Summary: trim list of exported symbols
Product: libxklavier Reporter: Michael Biebl <mbiebl>
Component: GeneralAssignee: Sergey V. Udaltsov <svu>
Status: RESOLVED FIXED QA Contact: Sergey V. Udaltsov <svu>
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: list of exported symbols
list of private symbols

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.