RFR: 8276563: Undefined Behaviour in class Assembler [v3]

Thomas Stuefe stuefe at openjdk.java.net
Sat Nov 13 10:12:37 UTC 2021


On Sat, 13 Nov 2021 09:40:51 GMT, Andrew Haley <aph at openjdk.org> wrote:

>> src/hotspot/share/asm/register.hpp line 87:
>> 
>>> 85: // OS-specific way.
>>> 86: #ifdef __GNUC__
>>> 87: #define INTERNAL_VISIBILITY  __attribute__ ((visibility ("internal")))
>> 
>> I try to understand this, is this to allow other object files to see these symbols while preventing them from being exported from the libjvm?
>
> Preventing them from being _redefined_ by other shared libraries. Without this, every time you load the address of `all_Registers` you load from the Global Offset Table, rather than using an immediate operand.

Ah, thanks for the explanation.

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

PR: https://git.openjdk.java.net/jdk/pull/6280


More information about the hotspot-compiler-dev mailing list