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 C++ symbols from dmlc-core #6188

Merged
merged 1 commit into from
Oct 1, 2020
Merged

Conversation

hcho3
Copy link
Collaborator

@hcho3 hcho3 commented Sep 30, 2020

Follow-up to #5590. The HIDE_CXX_SYMBOLS option is currently incomplete since it does not hide C++ symbols from dmlc-core. This pull request plugs the gap.

Before:

$ readelf -a --wide  lib/libxgboost.so | grep Open | grep LocalFileSystem
000000000b52a218  000006fd00000001 R_X86_64_64            0000000000528960 _ZN4dmlc2io15LocalFileSystem4OpenERKNS0_3URIEPKcb + 0
000000000b52a220  000007f700000001 R_X86_64_64            0000000000528150 _ZN4dmlc2io15LocalFileSystem11OpenForReadERKNS0_3URIEb + 0
  1789: 0000000000528960  2457 FUNC    GLOBAL DEFAULT   12 _ZN4dmlc2io15LocalFileSystem4OpenERKNS0_3URIEPKcb
  2039: 0000000000528150    19 FUNC    GLOBAL DEFAULT   12 _ZN4dmlc2io15LocalFileSystem11OpenForReadERKNS0_3URIEb
 16349: 0000000000528960  2457 FUNC    GLOBAL DEFAULT   12 _ZN4dmlc2io15LocalFileSystem4OpenERKNS0_3URIEPKcb
 16888: 0000000000528150    19 FUNC    GLOBAL DEFAULT   12 _ZN4dmlc2io15LocalFileSystem11OpenForReadERKNS0_3URIEb

After:

$ readelf -a --wide  lib/libxgboost.so | grep Open | grep LocalFileSystem
 12724: 000000000050ecd0  2457 FUNC    LOCAL  DEFAULT   12 _ZN4dmlc2io15LocalFileSystem4OpenERKNS0_3URIEPKcb
 15140: 000000000050e4c0    19 FUNC    LOCAL  DEFAULT   12 _ZN4dmlc2io15LocalFileSystem11OpenForReadERKNS0_3URIEb

Related: dmlc/treelite#210, apache/tvm#4953

Copy link
Contributor

@wphicks wphicks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hcho3 hcho3 merged commit eb7946f into dmlc:master Oct 1, 2020
@hcho3 hcho3 deleted the hide_cxx_symbol_dmlc branch October 1, 2020 17:07
hcho3 added a commit to hcho3/xgboost that referenced this pull request Oct 6, 2020
@hcho3 hcho3 mentioned this pull request Oct 6, 2020
2 tasks
hcho3 added a commit that referenced this pull request Oct 12, 2020
* Hide C++ symbols from dmlc-core (#6188)

* Up version to 1.2.1

* Fix lint

* [CI] Fix Docker build for CUDA 11 (#6202)

* Update Dockerfile.gpu
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.

3 participants