Skip to content

Only export JNI and C-API symbols#164

Merged
Mytherin merged 1 commit intoduckdb:mainfrom
staticlibs:symbols_export
Mar 17, 2025
Merged

Only export JNI and C-API symbols#164
Mytherin merged 1 commit intoduckdb:mainfrom
staticlibs:symbols_export

Conversation

@staticlibs
Copy link
Collaborator

Currently libduckdb_java.so shared lib exports all symbols. This is not good for a library that needs to be loaded into JVM process.

Proposed change makes the shared lib to only export the JNI and C-API symbols. C-API symbols are exported with the intention to be used by C-API-based extensions.

Testing: no functional changes, no new tests.

Fixes: #102

@Mytherin
Copy link
Contributor

Thanks! LGTM - could you just look at the merge conflicts?

Currently libduckdb_java.so shared lib exports all symbols. This is not
good for a library that needs to be loaded into JVM process.

Proposed change makes the shared lib to only export the JNI and C-API
symbols. C-API symbols are exported with the intention to be used by
C-API-based extensions.

Testing: no functional changes, no new tests.

Fixes: duckdb#102
@staticlibs
Copy link
Collaborator Author

Thanks for the review! Rebased it onto the latest main.

@Mytherin Mytherin merged commit e8506d9 into duckdb:main Mar 17, 2025
7 checks passed
@Mytherin
Copy link
Contributor

Thanks!

@staticlibs staticlibs deleted the symbols_export branch March 17, 2025 15:16
staticlibs added a commit to staticlibs/duckdb-java that referenced this pull request Sep 16, 2025
This PR is a follow-up to duckdb#164 change, it fixes the exported symbols for
MacOS and adds listing of symbols on CI runs.
staticlibs added a commit to staticlibs/duckdb-java that referenced this pull request Sep 16, 2025
This PR is a follow-up to duckdb#164 change, it fixes the exported symbols for
MacOS and adds listing of symbols on CI runs.
staticlibs added a commit that referenced this pull request Sep 16, 2025
This PR is a follow-up to #164 change, it fixes the exported symbols for
MacOS and adds listing of symbols on CI runs.
staticlibs added a commit to staticlibs/duckdb-java that referenced this pull request Sep 16, 2025
This is a backport of the PR duckdb#386 to `v1.4-andium` stable branch.

This PR is a follow-up to duckdb#164 change, it fixes the exported symbols for
MacOS and adds listing of symbols on CI runs.
staticlibs added a commit that referenced this pull request Sep 16, 2025
This is a backport of the PR #386 to `v1.4-andium` stable branch.

This PR is a follow-up to #164 change, it fixes the exported symbols for
MacOS and adds listing of symbols on CI runs.
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.

JNI shared object pollutes ELF symbol namespace

2 participants