RFR: 8017234: Hotspot should stop using mapfiles [v2]

Magnus Ihse Bursie ihse at openjdk.org
Thu Feb 22 13:30:55 UTC 2024


On Thu, 22 Feb 2024 12:27:03 GMT, Magnus Ihse Bursie <ihse at openjdk.org> wrote:

>>> they were absent from .dynsym but available in .symtab as bind: local, visibility: default. Now they are completely gone.
>> 
>> I don't think that statement is correct. Or else my understanding about symbol tables is incomplete. Both `nm` (which shows `.symtab`) and `nm -D` (which shows `.dynsym`) are identical for the libjvm.so before and after the patch wrt to the JNIEXPORTed debug.cpp functions.
>> 
>> Was this a statement of your understanding of the situation, or could you spot an actual difference? If it is the latter, please let me know how I can view this difference.
>
> Your comment had me go and elfdump the entire libjvm.so and compare the entire output... :-) Now at least I understand why there were so many spurious changes in the linux binary -- the old symbols were named e.g. `JVM_MonitorWait@@SUNWprivate_1.1` while the new one are just named `JVM_MonitorWait`. This caused the segment to be shorter, and this in turned offsetted all following position, so the change cascaded down.

Ok, I see now that there is indeed a slight difference. The debug.cpp symbols are present as local symbols in the .symtab, both before and after this patch. However, before this patch they had visibility DEFAULT and now they have visibility HIDDEN. I don't think this matters for anything except the linker, but I should probably verify that they are still correctly usable from gcc.

I would appreciate it if someone could provide a step-by-step instruction on how to verify these functions on gdb (I haven't used it for 10-15 years so I apologize if I'm a bit rusty), or provide a pointer to where I can find such instructions. Is this supposed to work on core dumps, live attached processes or both?

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

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


More information about the build-dev mailing list