[prev in list] [next in list] [prev in thread] [next in thread]
List: openjdk-serviceability-dev
Subject: Re: RFR: 8311846: Resolve duplicate 'Thread' related symbols with JDK static linking
From: Jiangli Zhou <jiangli () openjdk ! org>
Date: 2024-01-30 19:40:48
Message-ID: blRv3XPwAKmh8a4aEWO6kSMJX8XinhNd2DkU42dYBsY=.0786e49c-a181-4cb7-acf2-b2cfb8e23fc5 () github ! com
[Download RAW message or body]
On Wed, 17 Jan 2024 00:14:58 GMT, Jiangli Zhou <jiangli@openjdk.org> wrote:
> Please review this PR with a simple solution for resolving duplicate `Thread` \
> symbol issue. In https://github.com/openjdk/jdk/pull/14808 comments, there was an \
> alternative suggestion to redefine the symbol at build time, such as \
> using`-DThread=HotSpotThread`. That would not address issues when symbol were \
> references as string literals. https://github.com/openjdk/jdk/pull/14808 also \
> discussed using namespace for hotspot code, which can have multiple \
> benefits/motivations. We could explore further using namespace with more consensus \
> on that approach.
> Contributed by Chuck Rasbold and @jianglizhou.
We (@AlanBateman, @cushon, @magicus, @jerboaa, @pron, @jianglizhou) discussed this \
topic via zoom as part of a regular static/hermetic Java discussions. The outcome \
favors the partial-linking/objcopy to localize symbols for hotspot. Here is a \
summary:
- A general solution is preferred compared to resolving symbol issues case by case.
- We can address this for unix-like platforms with toolings supporting \
partial-linking/objcopy for now. @magicus will provide additional information on \
supported gcc versions and considerations for Windows support.
- There is also a preference to localize symbols automatically without editing the \
symbol list manually. In our prototype for handling freetype symbols (as mentioned in \
https://github.com/openjdk/jdk/pull/14808#issuecomment-1631611220), @cjmoon1 looked \
into using `nm` to generate symbol list and feed that into `objcopy`. That might be \
do-able for hotspot symbols.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17456#issuecomment-1917753387
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic