Bug 12147

Summary: Rarian exports private symbols
Product: Rarian Reporter: Hans Petter Jansson <hpj>
Component: GeneralAssignee: Don Scorgie <Don>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: medium CC: dmacks
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Bug Depends on: 12247    
Bug Blocks:    
Attachments: Remove all symbols not matching /^rrn/ from publib ABI of librarian

Description Hans Petter Jansson 2007-08-24 16:20:07 UTC
Rarian 0.5.6 exports private symbols, for instance:

0000d8de T find_key
0000a555 T find_sect
0000cb3f T free_entry
00008a79 T handle_duplicate
0000d76d T get_name_for_file
0000cefc T sanity_check_categories
00008544 T scan_directories
00008833 T scan_directory
0000ba3c T set_category
0000dc07 T setup_default
0000d3c4 T setup_man_path

etc.

I suggest declaring private functions and variables 'static' or namespacing them if they are supposed to be exported.
Comment 1 Daniel Macks 2007-09-02 21:23:24 UTC
This is related to Bug #11969 (the whole libtinyxml is also public within librarian). Browsing librarian-0.5.8's public .h and 'nm -g librarian.dylib' on my machine, it appears that all public symbols begin with "rrn_" (Don, is that true, and if so is it reasonable to assume that it will be true into the future?). In that case, maybe we could use (warning, untested, just brainstorming here):

librarian_la_LDFLAGS -export-symbols-regex "^rrn_.*"

to privatize *all* other variables (including the private implementation-detail symbols, libtinyxml convenience-lib symbols, and anything else regardless of how it got there)?
Comment 2 Daniel Macks 2007-09-04 08:53:03 UTC
Created attachment 11412 [details] [review]
Remove all symbols not matching /^rrn/ from publib ABI of librarian

Also solves Bug #11969
Comment 3 Don Scorgie 2007-09-12 11:35:43 UTC
Fixed in 0.6.0.  Not committed to SVN due to bug #12247.  Marking this as a
dependance to remind me to commit when done.
Comment 4 Don Scorgie 2007-09-16 08:50:08 UTC
Committed.  Closing.

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.