#14 Add support for ELF symbols visibility

1.3.0
closed-out-of-date
None
3
2015-10-04
2006-05-28
No

The attached patch adds support for GCC's ELF symbols
visibility, making use of the already present
dllexport support. Basically it checks if the
compiler supports the visibility attribute
and -fvisibility=hidden (the first is a prerequisite
for the second), in which case it adds the
declarations so that it exports the API.

The patch is a bit big, because it uses my
convenience attributes.m4 file (that is used already
by a few packages, and allows to cache the test
values) to do the configure-time checks.

It also has to remove test_libFLAC because it tries
to use an internal symbol of libFLAC that shouldn't
be used as it's not exported. I wouldn't know how to
fix the test exactly.

The result after this patch is ~100 symbols less in
libFLAC, and ~50 more in the other libraries, not a
bad result after all.

HTH,
Diego "Flameeyes" Pettenò
<flameeyes@gentoo.org>

Discussion

  • Diego Elio Pettenò

    Logged In: YES
    user_id=60011

    This additional patch is needed for the xmms plugin to
    work, as it wasn't exporting the entry function correctly.

     
  • Josh Coalson

    Josh Coalson - 2006-06-13
    • priority: 5 --> 3
    • assigned_to: nobody --> jcoalson
    • status: open --> open-accepted
     
  • Diego Elio Pettenò

    Logged In: YES
    user_id=60011

    This is an incremental patch to apply over the other two
    that makes all the symbols protected within their
    libraries; it means that the libraries won't use PLTs to
    access their own symbols, reducing xine's "empty" startup
    from 67 symbols needed just for the initialisation.

    C++ libraries are skipped from the protected visibility
    because they declare callbacks, that needs to be exported
    with default visibility to work correctly.

     
  • Diego Elio Pettenò

    Logged In: YES
    user_id=60011

    Updated to 1.1.3-beta2, and merge 130 and 140 patches.

     
  • Diego Elio Pettenò

    Logged In: YES
    user_id=60011

    And updated protected patch too, without libOggFLAC stuff.

     
  • Erik

    Erik - 2015-10-04
    • status: open-accepted --> closed-out-of-date
    • Group: --> 1.3.0
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks