Bug 16129 - Don't export private symbols on non-win32 systems
Summary: Don't export private symbols on non-win32 systems
Alias: None
Product: cairo
Classification: Unclassified
Component: general (show other bugs)
Version: 1.6.4
Hardware: All All
: medium normal
Assignee: Carl Worth
QA Contact: cairo-bugs mailing list
Depends on:
Reported: 2008-05-28 01:59 UTC by Sebastian Dröge (slomo)
Modified: 2008-05-28 08:31 UTC (History)
0 users

See Also:
i915 platform:
i915 features:

cairo-export-symbols.patch (347 bytes, patch)
2008-05-28 01:59 UTC, Sebastian Dröge (slomo)
Details | Splinter Review
cairo-export-symbols.patch (422 bytes, patch)
2008-05-28 02:09 UTC, Sebastian Dröge (slomo)
Details | Splinter Review

Description Sebastian Dröge (slomo) 2008-05-28 01:59:31 UTC
Created attachment 16782 [details] [review]

it would be nice if cairo didn't export private symbols like _cairo_atomic_mutex, _cairo_font_face_mutex, etc.

Attached patch makes cairo export whatever is in cairo.def (for some reason I don't have that file) on win32 as it was before but uses a symbol export regexp on other systems that makes it export only "^cairo.*" symbols.

Please consider applying this for 1.6.

Comment 1 Sebastian Dröge (slomo) 2008-05-28 02:01:53 UTC
For x86 these symbols are:

$ objdump -T /usr/lib/libcairo.so.2 | grep _cairo
00060bec g    DO .bss	00000018  Base        _cairo_scaled_font_error_mutex
00060bd4 g    DO .bss	00000018  Base        _cairo_scaled_font_map_mutex
00060c1c g    DO .bss	00000018  Base        _cairo_xlib_display_mutex
00060c04 g    DO .bss	00000018  Base        _cairo_ft_unscaled_font_map_mutex
00060b8c g    DO .bss	00000018  Base        _cairo_pattern_solid_pattern_cache_lock
00060ba4 g    DO .bss	00000018  Base        _cairo_pattern_solid_surface_cache_lock
00060bbc g    DO .bss	00000018  Base        _cairo_font_face_mutex

Other architectures export potentially more.
Comment 2 Sebastian Dröge (slomo) 2008-05-28 02:09:34 UTC
Created attachment 16784 [details] [review]

Better patch that only marks those accidentially exported cairo_.*_mutex symbols as private.

The other patch might still make sense.
Comment 3 Chris Wilson 2008-05-28 02:23:43 UTC
Too slow ;-) Behdad had already fixed it with commit 626edfc333b77604b6955c12ae111d14c174034c.
Comment 4 Behdad Esfahbod 2008-05-28 08:31:04 UTC
commit b5c6c8565055e3e096e2f6727ca3c831575ff424
Author: Behdad Esfahbod <behdad@behdad.org>
Date:   Wed May 28 10:59:35 2008 -0400

    [src/check-def.sh] Also check for public variables (#16129)

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.