aboutsummaryrefslogtreecommitdiff
path: root/src/os/linux
diff options
context:
space:
mode:
authorcoleenp <none@none>2011-02-01 11:23:19 -0500
committercoleenp <none@none>2011-02-01 11:23:19 -0500
commitadd1d13e445369ef8b5648da06373f4662b08009 (patch)
tree39df29daa3ce31ddcc7b189723f99ba1dd6fabbf /src/os/linux
parent04747e65790fe8c03e109926f18741246ad7d96c (diff)
6588413: Use -fvisibility=hidden for gcc compiles
Summary: Add option for gcc 4 and above, define JNIEXPORT and JNIIMPORT to visibility=default, add for jio_snprintf and others since -fvisibility=hidden overrides --version-script definitions. Reviewed-by: kamg, never
Diffstat (limited to 'src/os/linux')
-rw-r--r--src/os/linux/vm/jvm_linux.cpp5
-rw-r--r--src/os/linux/vm/os_linux.cpp46
2 files changed, 5 insertions, 46 deletions
diff --git a/src/os/linux/vm/jvm_linux.cpp b/src/os/linux/vm/jvm_linux.cpp
index ea5bf2d36..6e305b802 100644
--- a/src/os/linux/vm/jvm_linux.cpp
+++ b/src/os/linux/vm/jvm_linux.cpp
@@ -29,11 +29,6 @@
#include <signal.h>
-/*
- * FIXME: This is temporary hack to keep Linux Runtime.exec()
- * code happy. See $JDK/src/linux/native/java/lang/UnixProcess_md.c
- */
-int _JVM_native_threads = 1;
// sun.misc.Signal ///////////////////////////////////////////////////////////
// Signal code is mostly copied from classic vm, signals_md.c 1.4 98/08/23
diff --git a/src/os/linux/vm/os_linux.cpp b/src/os/linux/vm/os_linux.cpp
index 5d34fc50c..8f9c60cfd 100644
--- a/src/os/linux/vm/os_linux.cpp
+++ b/src/os/linux/vm/os_linux.cpp
@@ -2509,8 +2509,10 @@ char *os::scan_pages(char *start, char* end, page_info* page_expected, page_info
return end;
}
-extern "C" void numa_warn(int number, char *where, ...) { }
-extern "C" void numa_error(char *where) { }
+// Something to do with the numa-aware allocator needs these symbols
+extern "C" JNIEXPORT void numa_warn(int number, char *where, ...) { }
+extern "C" JNIEXPORT void numa_error(char *where) { }
+extern "C" JNIEXPORT int fork1() { return fork(); }
// If we are running with libnuma version > 2, then we should
@@ -3483,7 +3485,7 @@ bool os::is_interrupted(Thread* thread, bool clear_interrupted) {
// Note that the VM will print warnings if it detects conflicting signal
// handlers, unless invoked with the option "-XX:+AllowUserSignalHandlers".
//
-extern "C" int
+extern "C" JNIEXPORT int
JVM_handle_linux_signal(int signo, siginfo_t* siginfo,
void* ucontext, int abort_if_unrecognized);
@@ -4678,44 +4680,6 @@ void os::pause() {
}
}
-extern "C" {
-
-/**
- * NOTE: the following code is to keep the green threads code
- * in the libjava.so happy. Once the green threads is removed,
- * these code will no longer be needed.
- */
-int
-jdk_waitpid(pid_t pid, int* status, int options) {
- return waitpid(pid, status, options);
-}
-
-int
-fork1() {
- return fork();
-}
-
-int
-jdk_sem_init(sem_t *sem, int pshared, unsigned int value) {
- return sem_init(sem, pshared, value);
-}
-
-int
-jdk_sem_post(sem_t *sem) {
- return sem_post(sem);
-}
-
-int
-jdk_sem_wait(sem_t *sem) {
- return sem_wait(sem);
-}
-
-int
-jdk_pthread_sigmask(int how , const sigset_t* newmask, sigset_t* oldmask) {
- return pthread_sigmask(how , newmask, oldmask);
-}
-
-}
// Refer to the comments in os_solaris.cpp park-unpark.
//