5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 #include "incls/_precompiled.incl" 26 #include "incls/_classLoader.cpp.incl" 27 28 29 // Entry points in zip.dll for loading zip/jar file entries 30 31 typedef void * * (JNICALL *ZipOpen_t)(const char *name, char **pmsg); 32 typedef void (JNICALL *ZipClose_t)(jzfile *zip); 33 typedef jzentry* (JNICALL *FindEntry_t)(jzfile *zip, const char *name, jint *sizeP, jint *nameLen); 34 typedef jboolean (JNICALL *ReadEntry_t)(jzfile *zip, jzentry *entry, unsigned char *buf, char *namebuf); 35 typedef jboolean (JNICALL *ReadMappedEntry_t)(jzfile *zip, jzentry *entry, unsigned char **buf, char *namebuf); 36 typedef jzentry* (JNICALL *GetNextEntry_t)(jzfile *zip, jint n); 37 38 static ZipOpen_t ZipOpen = NULL; 39 static ZipClose_t ZipClose = NULL; 40 static FindEntry_t FindEntry = NULL; 41 static ReadEntry_t ReadEntry = NULL; 42 static ReadMappedEntry_t ReadMappedEntry = NULL; 43 static GetNextEntry_t GetNextEntry = NULL; 44 static canonicalize_fn_t CanonicalizeEntry = NULL; 45 46 // Globals | 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 #include "precompiled.hpp" 26 #include "classfile/classFileParser.hpp" 27 #include "classfile/classFileStream.hpp" 28 #include "classfile/classLoader.hpp" 29 #include "classfile/javaClasses.hpp" 30 #include "classfile/systemDictionary.hpp" 31 #include "classfile/vmSymbols.hpp" 32 #include "compiler/compileBroker.hpp" 33 #include "gc_interface/collectedHeap.inline.hpp" 34 #include "interpreter/bytecodeStream.hpp" 35 #include "interpreter/oopMapCache.hpp" 36 #include "memory/allocation.inline.hpp" 37 #include "memory/generation.hpp" 38 #include "memory/oopFactory.hpp" 39 #include "memory/universe.inline.hpp" 40 #include "oops/constantPoolKlass.hpp" 41 #include "oops/instanceKlass.hpp" 42 #include "oops/instanceRefKlass.hpp" 43 #include "oops/oop.inline.hpp" 44 #include "oops/symbolOop.hpp" 45 #include "prims/jvm_misc.hpp" 46 #include "runtime/arguments.hpp" 47 #include "runtime/compilationPolicy.hpp" 48 #include "runtime/fprofiler.hpp" 49 #include "runtime/handles.hpp" 50 #include "runtime/handles.inline.hpp" 51 #include "runtime/hpi.hpp" 52 #include "runtime/init.hpp" 53 #include "runtime/interfaceSupport.hpp" 54 #include "runtime/java.hpp" 55 #include "runtime/javaCalls.hpp" 56 #include "runtime/threadCritical.hpp" 57 #include "runtime/timer.hpp" 58 #include "services/management.hpp" 59 #include "services/threadService.hpp" 60 #include "utilities/events.hpp" 61 #include "utilities/hashtable.hpp" 62 #include "utilities/hashtable.inline.hpp" 63 #ifdef TARGET_OS_FAMILY_linux 64 # include "hpi_linux.hpp" 65 # include "os_linux.inline.hpp" 66 #endif 67 #ifdef TARGET_OS_FAMILY_solaris 68 # include "hpi_solaris.hpp" 69 # include "os_solaris.inline.hpp" 70 #endif 71 #ifdef TARGET_OS_FAMILY_windows 72 # include "hpi_windows.hpp" 73 # include "os_windows.inline.hpp" 74 #endif 75 76 77 // Entry points in zip.dll for loading zip/jar file entries 78 79 typedef void * * (JNICALL *ZipOpen_t)(const char *name, char **pmsg); 80 typedef void (JNICALL *ZipClose_t)(jzfile *zip); 81 typedef jzentry* (JNICALL *FindEntry_t)(jzfile *zip, const char *name, jint *sizeP, jint *nameLen); 82 typedef jboolean (JNICALL *ReadEntry_t)(jzfile *zip, jzentry *entry, unsigned char *buf, char *namebuf); 83 typedef jboolean (JNICALL *ReadMappedEntry_t)(jzfile *zip, jzentry *entry, unsigned char **buf, char *namebuf); 84 typedef jzentry* (JNICALL *GetNextEntry_t)(jzfile *zip, jint n); 85 86 static ZipOpen_t ZipOpen = NULL; 87 static ZipClose_t ZipClose = NULL; 88 static FindEntry_t FindEntry = NULL; 89 static ReadEntry_t ReadEntry = NULL; 90 static ReadMappedEntry_t ReadMappedEntry = NULL; 91 static GetNextEntry_t GetNextEntry = NULL; 92 static canonicalize_fn_t CanonicalizeEntry = NULL; 93 94 // Globals |