Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce symbol exposure #9

Merged
merged 1 commit into from
Mar 16, 2018
Merged

Commits on Mar 16, 2018

  1. Reduce symbol exposure

    When creating an ELF shared object (by convention, a file named as
    lib*.so), all symbols are marked as public, hence included in the
    object's export symbol table. This commit reduces exported symbol
    by marking proper 'static'.
    
    [old]
    $ size build/libdcurl.so
       text    data     bss     dec     hex filename
      16752     924     160   17836    45ac build/libdcurl.so
    
    [new]
    size build/libdcurl.so
       text    data     bss     dec     hex filename
      15936     836     168   16940    422c build/libdcurl.so
    
    TODO: there are various way to control over symbol exports in GCC:
      * compiler flag -fvisibility=hidden
      * Using `ld' linker version script
    Once we confirm consistent API naming scheme, we can then apply these
    techniques.
    jserv committed Mar 16, 2018
    Configuration menu
    Copy the full SHA
    8eae749 View commit details
    Browse the repository at this point in the history