RFR: 8305935: Resolve multiple definition of 'jmm_<interface|version>' when statically linking with JDK native libraries [v2]

Jiangli Zhou jiangli at openjdk.org
Fri Apr 14 17:16:28 UTC 2023


On Fri, 14 Apr 2023 05:20:48 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> src/jdk.management/share/native/libmanagement_ext/management_ext.c line 34:
>> 
>>> 32: #define ERR_MSG_SIZE 128
>>> 33: 
>>> 34: const JmmInterface* jmm_interface_management_ext = NULL;
>> 
>> Can you add a comment before declaring the two "exported" symbols together:
>> 
>> // These symbols are global in this library but need to be uniquely named to avoid conflicts
>> // with same-named symbols in other libraries, when statically linking.
>> 
>> Thanks.
>
> Oops! Sorry meant to add this comment to the declarations in the hpp file.

Added comment as suggested (with minor adjustment) in management_ext.h. Thanks.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13451#discussion_r1167098349


More information about the serviceability-dev mailing list