Remove libjsig mapfile. ihse-remove-mapfiles-branch
authorihse
Tue, 13 Feb 2018 14:07:56 +0100
branchihse-remove-mapfiles-branch
changeset 56112 39286667d14e
parent 56111 71934e9574d7
child 56113 02cec376750e
Remove libjsig mapfile.
make/hotspot/lib/CompileLibjsig.gmk
make/mapfiles/libjsig/mapfile-vers-solaris
src/java.base/aix/native/libjsig/jsig.c
src/java.base/linux/native/libjsig/jsig.c
src/java.base/macosx/native/libjsig/jsig.c
src/java.base/solaris/native/libjsig/jsig.c
--- a/make/hotspot/lib/CompileLibjsig.gmk	Tue Feb 13 13:07:50 2018 +0100
+++ b/make/hotspot/lib/CompileLibjsig.gmk	Tue Feb 13 14:07:56 2018 +0100
@@ -35,7 +35,7 @@
 ifneq ($(OPENJDK_TARGET_OS), windows)
   ifeq ($(STATIC_BUILD), false)
     ifeq ($(OPENJDK_TARGET_OS), linux)
-      LIBJSIG_CFLAGS := -fPIC -D_GNU_SOURCE -D_REENTRANT $(EXTRA_CFLAGS)
+      LIBJSIG_CFLAGS := -fvisibility=hidden -fPIC -D_GNU_SOURCE -D_REENTRANT $(EXTRA_CFLAGS)
       LIBJSIG_LDFLAGS := $(LDFLAGS_HASH_STYLE) ${LDFLAGS_NO_EXEC_STACK} $(EXTRA_CFLAGS)
       LIBJSIG_LIBS := $(LIBDL)
 
@@ -57,7 +57,7 @@
       endif
 
     else ifeq ($(OPENJDK_TARGET_OS), solaris)
-      LIBJSIG_CFLAGS := -m64 -KPIC -mt -I $(TOPDIR)/src/hotspot/os/$(HOTSPOT_TARGET_OS_TYPE)/include
+      LIBJSIG_CFLAGS := -fvisibility=hidden -m64 -KPIC -mt -I $(TOPDIR)/src/hotspot/os/$(HOTSPOT_TARGET_OS_TYPE)/include
       LIBJSIG_LDFLAGS := -m64 -mt -xnolib
       LIBJSIG_LIBS := $(LIBDL)
 
@@ -66,7 +66,7 @@
       SET_SHARED_LIBRARY_NAME :=
 
     else ifeq ($(OPENJDK_TARGET_OS), aix)
-      LIBJSIG_CFLAGS := -q64 -D_GNU_SOURCE -D_REENTRANT -qpic=large
+      LIBJSIG_CFLAGS := -fvisibility=hidden -q64 -D_GNU_SOURCE -D_REENTRANT -qpic=large
       LIBJSIG_LDFLAGS := -b64 -bexpall -G -bnoentry -qmkshrobj -brtl -bnolibpath -bernotok
       LIBJSIG_LIBS := $(LIBDL)
 
@@ -75,14 +75,17 @@
       SET_SHARED_LIBRARY_NAME :=
 
     else ifeq ($(OPENJDK_TARGET_OS), macosx)
-      LIBJSIG_CFLAGS := -m64 -D_GNU_SOURCE -pthread -mno-omit-leaf-frame-pointer -mstack-alignment=16 -fPIC
+      LIBJSIG_CFLAGS := -fvisibility=hidden -m64 -D_GNU_SOURCE -pthread -mno-omit-leaf-frame-pointer -mstack-alignment=16 -fPIC
       LIBJSIG_LDFLAGS := $(LDFLAGS_HASH_STYLE)
     else
       $(error Unknown target OS $(OPENJDK_TARGET_OS) in CompileLibjsig.gmk)
     endif
 
+    LIBJSIG_CFLAGS += \
+        -I$(TOPDIR)/src/java.base/share/native/include \
+        -I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/include \
+        #
     LIBJSIG_SRC_DIR := $(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/native/libjsig
-    LIBJSIG_MAPFILE := $(wildcard $(TOPDIR)/make/mapfiles/libjsig/mapfile-vers-$(OPENJDK_TARGET_OS))
     LIBJSIG_OUTPUTDIR := $(HOTSPOT_OUTPUTDIR)/libjsig
 
     LIBJSIG_LDFLAGS += $(SHARED_LIBRARY_FLAGS)
@@ -97,7 +100,6 @@
         CFLAGS := $(LIBJSIG_CFLAGS) $(LIBJSIG_CPU_FLAGS), \
         LDFLAGS := $(LIBJSIG_LDFLAGS) $(LIBJSIG_CPU_FLAGS), \
         LIBS := $(LIBJSIG_LIBS), \
-        MAPFILE := $(LIBJSIG_MAPFILE), \
         OBJECT_DIR := $(LIBJSIG_OUTPUTDIR)/objs, \
     ))
 
--- a/make/mapfiles/libjsig/mapfile-vers-solaris	Tue Feb 13 13:07:50 2018 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-#
-# Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#  
-#
-
-# Define library interface.
-
-SUNWprivate_1.1 {
-        global:
-            JVM_begin_signal_setting;
-            JVM_end_signal_setting;
-            JVM_get_libjsig_version;
-            JVM_get_signal_action;
-            sigaction;
-            signal;
-            sigset;
-        local:
-                *;
-};
--- a/src/java.base/aix/native/libjsig/jsig.c	Tue Feb 13 13:07:50 2018 +0100
+++ b/src/java.base/aix/native/libjsig/jsig.c	Tue Feb 13 14:07:56 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2012, 2015 SAP SE. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -37,6 +37,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdint.h>
+#incldue "jni.h"
 
 #define bool int
 #define true 1
@@ -140,11 +141,11 @@
   }
 }
 
-sa_handler_t signal(int sig, sa_handler_t disp) {
+JNIEXPORT sa_handler_t signal(int sig, sa_handler_t disp) {
   return set_signal(sig, disp, false);
 }
 
-sa_handler_t sigset(int sig, sa_handler_t disp) {
+JNIEXPORT sa_handler_t sigset(int sig, sa_handler_t disp) {
   return set_signal(sig, disp, true);
 }
 
@@ -161,7 +162,7 @@
   return (*os_sigaction)(sig, act, oact);
 }
 
-int sigaction(int sig, const struct sigaction *act, struct sigaction *oact) {
+JNIEXPORT int sigaction(int sig, const struct sigaction *act, struct sigaction *oact) {
   int res;
   bool sigused;
   struct sigaction oldAct;
@@ -206,7 +207,7 @@
 }
 
 /* The three functions for the jvm to call into. */
-void JVM_begin_signal_setting() {
+JNIEXPORT void JVM_begin_signal_setting() {
   signal_lock();
   sigemptyset(&jvmsigs);
   jvm_signal_installing = true;
@@ -214,7 +215,7 @@
   signal_unlock();
 }
 
-void JVM_end_signal_setting() {
+JNIEXPORT void JVM_end_signal_setting() {
   signal_lock();
   jvm_signal_installed = true;
   jvm_signal_installing = false;
@@ -222,7 +223,7 @@
   signal_unlock();
 }
 
-struct sigaction *JVM_get_signal_action(int sig) {
+JNIEXPORT struct sigaction *JVM_get_signal_action(int sig) {
   /* Does race condition make sense here? */
   if (sigismember(&jvmsigs, sig)) {
     return &sact[sig];
--- a/src/java.base/linux/native/libjsig/jsig.c	Tue Feb 13 13:07:50 2018 +0100
+++ b/src/java.base/linux/native/libjsig/jsig.c	Tue Feb 13 14:07:56 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -36,6 +36,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdint.h>
+#include "jni.h"
 
 #define bool int
 #define true 1
@@ -141,11 +142,11 @@
   }
 }
 
-sa_handler_t signal(int sig, sa_handler_t disp) {
+JNIEXPORT sa_handler_t signal(int sig, sa_handler_t disp) {
   return set_signal(sig, disp, false);
 }
 
-sa_handler_t sigset(int sig, sa_handler_t disp) {
+JNIEXPORT sa_handler_t sigset(int sig, sa_handler_t disp) {
   return set_signal(sig, disp, true);
  }
 
@@ -161,7 +162,7 @@
   return (*os_sigaction)(sig, act, oact);
 }
 
-int sigaction(int sig, const struct sigaction *act, struct sigaction *oact) {
+JNIEXPORT int sigaction(int sig, const struct sigaction *act, struct sigaction *oact) {
   int res;
   bool sigused;
   struct sigaction oldAct;
@@ -206,14 +207,14 @@
 }
 
 /* The three functions for the jvm to call into */
-void JVM_begin_signal_setting() {
+JNIEXPORT void JVM_begin_signal_setting() {
   signal_lock();
   jvm_signal_installing = true;
   tid = pthread_self();
   signal_unlock();
 }
 
-void JVM_end_signal_setting() {
+JNIEXPORT void JVM_end_signal_setting() {
   signal_lock();
   jvm_signal_installed = true;
   jvm_signal_installing = false;
@@ -221,7 +222,7 @@
   signal_unlock();
 }
 
-struct sigaction *JVM_get_signal_action(int sig) {
+JNIEXPORT struct sigaction *JVM_get_signal_action(int sig) {
   /* Does race condition make sense here? */
   if ((MASK(sig) & jvmsigs) != 0) {
     return &sact[sig];
--- a/src/java.base/macosx/native/libjsig/jsig.c	Tue Feb 13 13:07:50 2018 +0100
+++ b/src/java.base/macosx/native/libjsig/jsig.c	Tue Feb 13 14:07:56 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -37,6 +37,7 @@
 #include <stdlib.h>
 #include <stdbool.h>
 #include <stdint.h>
+#include "jni.h"
 
 #define MASK(sig) ((uint32_t)1 << (sig-1))  // 0 is not a signal.
 #if (32 < NSIG-1)
@@ -143,11 +144,11 @@
   }
 }
 
-sa_handler_t signal(int sig, sa_handler_t disp) {
+JNIEXPORT sa_handler_t signal(int sig, sa_handler_t disp) {
   return set_signal(sig, disp, false);
 }
 
-sa_handler_t sigset(int sig, sa_handler_t disp) {
+JNIEXPORT sa_handler_t sigset(int sig, sa_handler_t disp) {
   printf("sigset() is not supported by BSD");
   exit(0);
  }
@@ -164,7 +165,7 @@
   return (*os_sigaction)(sig, act, oact);
 }
 
-int sigaction(int sig, const struct sigaction *act, struct sigaction *oact) {
+JNIEXPORT int sigaction(int sig, const struct sigaction *act, struct sigaction *oact) {
   int res;
   bool sigused;
   struct sigaction oldAct;
@@ -213,14 +214,14 @@
 }
 
 /* The three functions for the jvm to call into */
-void JVM_begin_signal_setting() {
+JNIEXPORT void JVM_begin_signal_setting() {
   signal_lock();
   jvm_signal_installing = true;
   tid = pthread_self();
   signal_unlock();
 }
 
-void JVM_end_signal_setting() {
+JNIEXPORT void JVM_end_signal_setting() {
   signal_lock();
   jvm_signal_installed = true;
   jvm_signal_installing = false;
@@ -228,7 +229,7 @@
   signal_unlock();
 }
 
-struct sigaction *JVM_get_signal_action(int sig) {
+JNIEXPORT struct sigaction *JVM_get_signal_action(int sig) {
   /* Does race condition make sense here? */
   if ((MASK(sig) & jvmsigs) != 0) {
     return &sact[sig];
--- a/src/java.base/solaris/native/libjsig/jsig.c	Tue Feb 13 13:07:50 2018 +0100
+++ b/src/java.base/solaris/native/libjsig/jsig.c	Tue Feb 13 14:07:56 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -37,6 +37,7 @@
 #include <dlfcn.h>
 #include <thread.h>
 #include <synch.h>
+#incldue "jni.h"
 #include "jvm_md.h"
 
 #define bool int
@@ -176,11 +177,11 @@
   }
 }
 
-sa_handler_t signal(int sig, sa_handler_t disp) {
+JNIEXPORT sa_handler_t signal(int sig, sa_handler_t disp) {
   return set_signal(sig, disp, false);
 }
 
-sa_handler_t sigset(int sig, sa_handler_t disp) {
+JNIEXPORT sa_handler_t sigset(int sig, sa_handler_t disp) {
   return set_signal(sig, disp, true);
 }
 
@@ -196,7 +197,7 @@
   return (*os_sigaction)(sig, act, oact);
 }
 
-int sigaction(int sig, const struct sigaction *act, struct sigaction *oact) {
+JNIEXPORT int sigaction(int sig, const struct sigaction *act, struct sigaction *oact) {
   int res;
   struct sigaction oldAct;
 
@@ -242,14 +243,14 @@
 }
 
 /* The four functions for the jvm to call into */
-void JVM_begin_signal_setting() {
+JNIEXPORT void JVM_begin_signal_setting() {
   signal_lock();
   jvm_signal_installing = true;
   tid = thr_self();
   signal_unlock();
 }
 
-void JVM_end_signal_setting() {
+JNIEXPORT void JVM_end_signal_setting() {
   signal_lock();
   jvm_signal_installed = true;
   jvm_signal_installing = false;
@@ -257,7 +258,7 @@
   signal_unlock();
 }
 
-struct sigaction *JVM_get_signal_action(int sig) {
+JNIEXPORT struct sigaction *JVM_get_signal_action(int sig) {
   if (sact == NULL) {
     allocate_sact();
   }
@@ -268,6 +269,6 @@
   return NULL;
 }
 
-int JVM_get_libjsig_version() {
+JNIEXPORT int JVM_get_libjsig_version() {
   return JSIG_VERSION_1_4_1;
 }