RFR: 8311846: Resolve duplicate 'Thread' related symbols with JDK static linking

Jiangli Zhou jiangli at openjdk.org
Mon Jan 22 06:47:26 UTC 2024


On Sat, 20 Jan 2024 18:00:15 GMT, Andrew Haley <aph at openjdk.org> wrote:

> > > You could support one build by adding something like -DSUPPORTS_STATIC_LINK for both .so and .a builds for Google, then use that to protect the renaming.
> > 
> > 
> > Thanks, @coleenp. I think that could work for all different cases. I'll reflect that in this PR.
> > For longer term we probably still want to find a cleaner solution when the static support becomes more popular.
> 
> I think you should be able to use ld and objcopy to merge the .o files and hide all of the symbols you don't want to export.

We also discussed about `objcopy` in https://github.com/openjdk/jdk/pull/14808#issuecomment-1631597197 and https://github.com/openjdk/jdk/pull/14808#issuecomment-1631611220. My main concern was the portability of `objcopy` approach.

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

PR Comment: https://git.openjdk.org/jdk/pull/17456#issuecomment-1903359606


More information about the serviceability-dev mailing list