On Thu, 22 Feb 2024 09:41:45 GMT, Magnus Ihse Bursie <i...@openjdk.org> wrote:

>> src/hotspot/share/utilities/debug.cpp line 71:
>> 
>>> 69: 
>>> 70: #if defined(TARGET_COMPILER_gcc)
>>> 71: #undef JNIEXPORT
>> 
>> This partially reverts 
>> [JDK-8264593](https://bugs.openjdk.org/browse/JDK-8264593); @kevinjwalls 
>> will this work for you?
>
> No, it doesn't. Even after 
> [JDK-8264593](https://bugs.openjdk.org/browse/JDK-8264593) the symbols from 
> debug.cpp were not exported on Linux, since they were not mentioned in 
> `make/data/hotspot-symbols`, and thus were made local.
> 
> The reason I put this in was to keep parity with the symbol table before and 
> after the patch.
> 
> My guess is that it was only on Windows it was necessary that the functions 
> where JNIEXPORTed, otherwise someone would have complained after JDK-8264593. 
> But for platform consistency, it might make sense to export these even on gcc 
> as well. After this PR is integrated, this is easy to do -- just remove the 
> above hack.

they were absent from .dynsym but available in .symtab as bind: local, 
visibility: default. Now they are completely gone.

The symbols were supposed to be used from gdb. I'm not sure if gdb can access 
local symbols, so it's possible that they didn't work even before this change.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17955#discussion_r1498964087

Reply via email to