RFR: 8311661: Resolve duplicate symbol of StringTable::StringTable with JDK static linking [v2]

Ioi Lam iklam at openjdk.org
Tue Jul 11 22:41:06 UTC 2023


On Mon, 10 Jul 2023 16:40:06 GMT, Jiangli Zhou <jiangli at openjdk.org> wrote:

>> Move StringTable to JavaClassFile namespace.
>
> Jiangli Zhou has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
> 
>  - Merge branch 'master' into JDK-8311661
>  - Move  '} // namespace JavaClassFile' to after '#endif //INCLUDE_CDS_JAVA_HEAP'.
>  - 8311661: Resolve duplicate symbol of StringTable::StringTable with JDK static linking

I found a way to hide the unwanted symbols in libjvm.a. This requires `ld --relocatable` and `objcopy --keep-global-symbols=...`. See the prototype here:

- https://github.com/iklam/tools/tree/main/misc/staticlib

So potentially we can do this completely in the makefiles, without adding namespaces to HotSpot.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/14808#issuecomment-1631597197


More information about the hotspot-dev mailing list