Bug 12147 - Rarian exports private symbols
Summary: Rarian exports private symbols
Status: RESOLVED FIXED
Alias: None
Product: Rarian
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: Other All
: medium major
Assignee: Don Scorgie
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 12247
Blocks:
  Show dependency treegraph
 
Reported: 2007-08-24 16:20 UTC by Hans Petter Jansson
Modified: 2007-09-16 08:50 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Remove all symbols not matching /^rrn/ from publib ABI of librarian (362 bytes, patch)
2007-09-04 08:53 UTC, Daniel Macks
Details | Splinter Review

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.