RFR: 8017234: Hotspot should stop using mapfiles
Julian Waters
jwaters at openjdk.org
Thu Feb 22 09:57:55 UTC 2024
On Thu, 22 Feb 2024 09:29:25 GMT, Magnus Ihse Bursie <ihse at openjdk.org> wrote:
>> src/hotspot/share/oops/accessBackend.cpp line 36:
>>
>>> 34:
>>> 35: #if defined(TARGET_COMPILER_gcc)
>>> 36: #define HIDDEN __attribute__ ((visibility ("hidden")))
>>
>> Couldn't this use [[gnu::visibility("hidden")]] instead, since HotSpot now allows C++14 Attributes? But this doesn't look like a very nice solution regardless
>
> We're currently using __attribute__ ((visibility ("X"))) elsewhere, so I think I should stick with that.
>
> And, as I said in my long explanation, this is definitely a hack. The reason it is here is that I want to make sure the symbol table is 100% identical before and after this patch.
>
> Why this is needed, I don't know. I believe it is a bug in GCC, since we compile with -fvisibility=hidden. But I don't really know. Maybe there is something in the C++ standard that makes these functions behave differently. Perhaps they are even slightly incorrectly defined?
Ah, I should have clarified that I did read the explaination, just that it slipped my mind at the time. I can't remember if C++14 or C++17 is the version for compilers ignoring unknown attributes though
Also, you can escape the underscores with \ to avoid GitHub formatting. GitHub can get annoying with its formatting sometimes
Is there a chance this can be fixed in a followup somehow? I could help with that, given I have access to WSL2 for Linux
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17955#discussion_r1498972139
More information about the build-dev
mailing list