Uploaded image for project: 'Qpid Proton'
  1. Qpid Proton
  2. PROTON-250

Add -fvisibility option when building shared libraries

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.3
    • Fix Version/s: 0.13.0
    • Component/s: proton-c
    • Labels:
    • Environment:
      GNU Compiler

      Description

      Add an option to "hide" symbols in shared libraries except when they are declared public.
      Extends efforts already in place for Windows builds.
      Excludes an effort to determine what symbols should be considered "public" interfaces.

      The gcc 4 -fvisibility option is said to:

      ...very substantially improve linking and load times of shared object libraries, produce more optimized code, provide near-perfect API export and prevent symbol clashes. It is strongly recommended that you use this in any shared objects you distribute.

      See here: http://gcc.gnu.org/wiki/Visibility

      Attached patch (patch.txt) will build libqpid-proton.so shared library using this flag.
      It reduces number of symbols from 700+ to 500+.

      1. proton.patch
        2 kB
        Irina Boverman

        Activity

        Hide
        justi9 Justin Ross added a comment -
        Show
        justi9 Justin Ross added a comment - Released in Qpid Proton 0.13.0, http://qpid.apache.org/releases/qpid-proton-0.13.0/index.html
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 4d90acd6eeb254155aff07caf1aaef00f6338b5a in qpid-proton's branch refs/heads/master from Andrew Stitcher
        [ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=4d90acd ]

        PROTON-250: [C++ binding] Hide all exported library internal only symbols

        Show
        jira-bot ASF subversion and git services added a comment - Commit 4d90acd6eeb254155aff07caf1aaef00f6338b5a in qpid-proton's branch refs/heads/master from Andrew Stitcher [ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=4d90acd ] PROTON-250 : [C++ binding] Hide all exported library internal only symbols
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit ca433506c346f088077bb786d5544e419b210cf7 in qpid-proton's branch refs/heads/master from Andrew Stitcher
        [ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=ca43350 ]

        PROTON-250: Adjust proton-dump to keep on compiling:

        • It uses proton-c internals so some files from proton are compiled
          explicitly with proton-dump. Perhaps making a static proton would
          be a better solution.
        • Do the trivial arglist scanning manually instead of using getopt
        • Fix a change in include path missed in the test tools.
        Show
        jira-bot ASF subversion and git services added a comment - Commit ca433506c346f088077bb786d5544e419b210cf7 in qpid-proton's branch refs/heads/master from Andrew Stitcher [ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=ca43350 ] PROTON-250 : Adjust proton-dump to keep on compiling: It uses proton-c internals so some files from proton are compiled explicitly with proton-dump. Perhaps making a static proton would be a better solution. Do the trivial arglist scanning manually instead of using getopt Fix a change in include path missed in the test tools.
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 874d85b2d6ec53e4ca9e75c3018862f84cf18300 in qpid-proton's branch refs/heads/master from Andrew Stitcher
        [ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=874d85b ]

        PROTON-250: Fix misc symbol visibility issues:

        • Hide all library internal only symbols
        • Make log.h export only unmangled C symbols
        Show
        jira-bot ASF subversion and git services added a comment - Commit 874d85b2d6ec53e4ca9e75c3018862f84cf18300 in qpid-proton's branch refs/heads/master from Andrew Stitcher [ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=874d85b ] PROTON-250 : Fix misc symbol visibility issues: Hide all library internal only symbols Make log.h export only unmangled C symbols
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 525fad994b2610f9d1c6ee92dddc419cd5c2d180 in qpid-proton's branch refs/heads/master from Andrew Stitcher
        [ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=525fad9 ]

        PROTON-250: [C++ binding] Hide symbol visibility

        • Make necessary C++ symbols visible
        Show
        jira-bot ASF subversion and git services added a comment - Commit 525fad994b2610f9d1c6ee92dddc419cd5c2d180 in qpid-proton's branch refs/heads/master from Andrew Stitcher [ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=525fad9 ] PROTON-250 : [C++ binding] Hide symbol visibility Make necessary C++ symbols visible
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 0576b607e16292bd963997420323ebebb35ce3a6 in qpid-proton's branch refs/heads/master from Andrew Stitcher
        [ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=0576b60 ]

        PROTON-250: [C] Hide symbol visibility on Linux too (as well as Windows)

        • Also allow link time optimisation (lto) (but initially default is disabled)
        Show
        jira-bot ASF subversion and git services added a comment - Commit 0576b607e16292bd963997420323ebebb35ce3a6 in qpid-proton's branch refs/heads/master from Andrew Stitcher [ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=0576b60 ] PROTON-250 : [C] Hide symbol visibility on Linux too (as well as Windows) Also allow link time optimisation (lto) (but initially default is disabled)

          People

          • Assignee:
            astitcher Andrew Stitcher
            Reporter:
            iboverma Irina Boverman
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development