Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8008509

6588413 changed JNIEXPORT visibility for GCC on HSX, jdk's jni_md.h needs similar change

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • P4
    • Resolution: Fixed
    • 7, 8
    • 8
    • core-libs
    • None
    • b87
    • generic
    • generic

    Description

      This changeset:

      http://hg.openjdk.java.net/jdk7/hotspot-rt/hotspot/rev/d70fe6ab4436

      made this change (among others):

      --- a/src/cpu/x86/vm/jni_x86.h Thu Jan 27 16:11:27 2011 -0800
      +++ b/src/cpu/x86/vm/jni_x86.h Tue Feb 01 11:23:19 2011 -0500
      @@ -27,10 +27,16 @@
      #define _JAVASOFT_JNI_MD_H_
      #if defined(SOLARIS) || defined(LINUX)
      +
      +#if defined(__GNUC__) && (__GNUC__ > 4) || (__GNUC__ == 4) && (__GNUC_MINOR__ > 2)
      + #define JNIEXPORT __attribute__((visibility("default")))
      + #define JNIIMPORT __attribute__((visibility("default")))
      +#else
      #define JNIEXPORT
      #define JNIIMPORT
      +#endif
      +
      #define JNICALL
      -
      typedef int jint;
      #ifdef _LP64

      The JDK repo contain the official version of the jni_md.h file that is included in
      the distribution and it does not have this change:

      $ hg annotate src/solaris/javavm/export/jni_md.h
         0: /*
      2362: * Copyright (c) 1996, 2000, Oracle and/or its affiliates. All rights reserved.
         0: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
         0: *
         0: * This code is free software; you can redistribute it and/or modify it
         0: * under the terms of the GNU General Public License version 2 only, as
      2362: * published by the Free Software Foundation. Oracle designates this
         0: * particular file as subject to the "Classpath" exception as provided
      2362: * by Oracle in the LICENSE file that accompanied this code.
         0: *
         0: * This code is distributed in the hope that it will be useful, but WITHOUT
         0: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
         0: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
         0: * version 2 for more details (a copy is included in the LICENSE file that
         0: * accompanied this code).
         0: *
         0: * You should have received a copy of the GNU General Public License version
         0: * 2 along with this work; if not, write to the Free Software Foundation,
         0: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
         0: *
      2362: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
      2362: * or visit www.oracle.com if you need additional information or have any
      2362: * questions.
         0: */
         0:
         0: #ifndef _JAVASOFT_JNI_MD_H_
         0: #define _JAVASOFT_JNI_MD_H_
         0:
         0: #define JNIEXPORT
         0: #define JNIIMPORT
         0: #define JNICALL
         0:
         0: typedef int jint;
         0: #ifdef _LP64 /* 64-bit Solaris */
         0: typedef long jlong;
         0: #else
         0: typedef long long jlong;
         0: #endif
         0:
         0: typedef signed char jbyte;
         0:
         0: #endif /* !_JAVASOFT_JNI_MD_H_ */


      During the code review cycle for:

          6588413: Use -fvisibility=hidden for gcc compiles

      the need for an update to the jdk repo's jni_md.h was brought up, but it looks
      like that detail was dropped.

      Attachments

        Issue Links

          Activity

            People

              martin Martin Buchholz
              dcubed Daniel Daugherty
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: