RFR: 8305935: Resolve multiple definition of 'jmm_<interface|version>' when statically linking with JDK native libraries
David Holmes
dholmes at openjdk.org
Fri Apr 14 05:23:35 UTC 2023
On Fri, 14 Apr 2023 05:17:28 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Rename 'jmm_<interface|version>' to 'jmm_<interface|version>_management_ext' in libmanagement_ext to resolve related linker errors when statically linking with both libmanagement and libmanagement_ext.
>
> 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.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13451#discussion_r1166288127
More information about the serviceability-dev
mailing list