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

Hide non-public symbols with LD version script #36

Merged
merged 1 commit into from
Mar 25, 2018

Conversation

jserv
Copy link
Member

@jserv jserv commented Mar 24, 2018

Version scripts provides information that can be used by GNU/Linux
distribution packaging tools. For example, Debian has a tool
dpkg-shlibdeps that can determine the minimal required version of each
dependency (by looking at the symbol list) and stuff the information
into the Debian specific packaging files.

We can utilize such feasture to reduce the size of shared library as
well.

[orig]
$ size build/libdcurl.so
text data bss dec hex filename
16836 840 168 17844 45b4 build/libdcurl.so

[LD-version-script]
$ size build/libdcurl.so
text data bss dec hex filename
15472 760 168 16400 4010 build/libdcurl.so

Version scripts provides information that can be used by GNU/Linux
distribution packaging tools. For example, Debian has a tool
dpkg-shlibdeps that can determine the minimal required version of each
dependency (by looking at the symbol list) and stuff the information
into the Debian specific packaging files.

We can utilize such feasture to reduce the size of shared library as
well.

[orig]
$ size build/libdcurl.so
   text    data     bss     dec     hex filename
  16836     840     168   17844    45b4 build/libdcurl.so

[LD-version-script]
$ size build/libdcurl.so
   text    data     bss     dec     hex filename
  15472     760     168   16400    4010 build/libdcurl.so
@furuame furuame merged commit 41eb093 into DLTcollab:dev Mar 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants