Fri, 15 Apr 2011 09:34:43 -0400
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
Summary: Created Windows Dll wrapped to handle jdk6 and jdk7 platform requirements, also provided more restictive Dll search orders for Windows system Dlls.
Reviewed-by: acorn, dcubed, ohair, alanb
1 #
2 # Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
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 #
25 !include $(WorkSpace)/make/windows/makefiles/rules.make
27 # This is used externally by both batch and IDE builds, so can't
28 # reference any of the HOTSPOTWORKSPACE, HOTSPOTBUILDSPACE,
29 # HOTSPOTRELEASEBINDEST, or HOTSPOTDEBUGBINDEST environment variables.
31 ProjectCreatorSources=\
32 $(WorkSpace)\src\share\tools\ProjectCreator\DirectoryTree.java \
33 $(WorkSpace)\src\share\tools\ProjectCreator\DirectoryTreeNode.java \
34 $(WorkSpace)\src\share\tools\ProjectCreator\FileFormatException.java \
35 $(WorkSpace)\src\share\tools\ProjectCreator\ProjectCreator.java \
36 $(WorkSpace)\src\share\tools\ProjectCreator\WinGammaPlatform.java \
37 $(WorkSpace)\src\share\tools\ProjectCreator\WinGammaPlatformVC6.java \
38 $(WorkSpace)\src\share\tools\ProjectCreator\WinGammaPlatformVC7.java \
39 $(WorkSpace)\src\share\tools\ProjectCreator\WinGammaPlatformVC8.java \
40 $(WorkSpace)\src\share\tools\ProjectCreator\WinGammaPlatformVC9.java \
41 $(WorkSpace)\src\share\tools\ProjectCreator\WinGammaPlatformVC10.java \
42 $(WorkSpace)\src\share\tools\ProjectCreator\Util.java \
43 $(WorkSpace)\src\share\tools\ProjectCreator\BuildConfig.java \
44 $(WorkSpace)\src\share\tools\ProjectCreator\ArgsParser.java
46 # This is only used internally
47 ProjectCreatorIncludesPRIVATE=\
48 -relativeInclude src\closed\share\vm \
49 -relativeInclude src\closed\os\windows\vm \
50 -relativeInclude src\closed\os_cpu\windows_$(Platform_arch)\vm \
51 -relativeInclude src\closed\cpu\$(Platform_arch)\vm \
52 -relativeInclude src\share\vm \
53 -relativeInclude src\share\vm\prims \
54 -relativeInclude src\os\windows\vm \
55 -relativeInclude src\os_cpu\windows_$(Platform_arch)\vm \
56 -relativeInclude src\cpu\$(Platform_arch)\vm \
57 -absoluteInclude $(HOTSPOTBUILDSPACE)/%f/generated \
58 -ignorePath $(HOTSPOTBUILDSPACE)/%f/generated \
59 -ignorePath src\share\vm\adlc \
60 -ignorePath src\share\vm\shark
62 # This is referenced externally by both the IDE and batch builds
63 ProjectCreatorOptions=
65 # This is used externally, but only by the IDE builds, so we can
66 # reference environment variables which aren't defined in the batch
67 # build process.
69 ProjectCreatorIDEOptions = \
70 -useToGeneratePch java.cpp \
71 -disablePch os_windows.cpp \
72 -disablePch os_windows_$(Platform_arch).cpp \
73 -disablePch osThread_windows.cpp \
74 -disablePch bytecodeInterpreter.cpp \
75 -disablePch bytecodeInterpreterWithChecks.cpp \
76 -disablePch getThread_windows_$(Platform_arch).cpp \
77 -disablePch_compiler2 opcodes.cpp
79 # Common options for the IDE builds for core, c1, and c2
80 ProjectCreatorIDEOptions=\
81 $(ProjectCreatorIDEOptions) \
82 -sourceBase $(HOTSPOTWORKSPACE) \
83 -buildBase $(HOTSPOTBUILDSPACE)\%f\%b \
84 -startAt src \
85 -compiler $(VcVersion) \
86 -projectFileName $(HOTSPOTBUILDSPACE)\$(ProjectFile) \
87 -jdkTargetRoot $(HOTSPOTJDKDIST) \
88 -define ALIGN_STACK_FRAMES \
89 -define VM_LITTLE_ENDIAN \
90 -prelink "" "Generating vm.def..." "cd $(HOTSPOTBUILDSPACE)\%f\%b set HOTSPOTMKSHOME=$(HOTSPOTMKSHOME) $(HOTSPOTMKSHOME)\sh $(HOTSPOTWORKSPACE)\make\windows\build_vm_def.sh $(LINK_VER)" \
91 -postbuild "" "Building hotspot.exe..." "cd $(HOTSPOTBUILDSPACE)\%f\%b set HOTSPOTMKSHOME=$(HOTSPOTMKSHOME) nmake -f $(HOTSPOTWORKSPACE)\make\windows\projectfiles\common\Makefile LOCAL_MAKE=$(HOTSPOTBUILDSPACE)\%f\local.make JAVA_HOME=$(HOTSPOTJDKDIST) launcher" \
92 -ignoreFile jsig.c \
93 -ignoreFile jvmtiEnvRecommended.cpp \
94 -ignoreFile jvmtiEnvStub.cpp \
95 -ignoreFile globalDefinitions_gcc.hpp \
96 -ignoreFile globalDefinitions_sparcWorks.hpp \
97 -ignoreFile version.rc \
98 -ignoreFile Xusage.txt \
99 -define TARGET_ARCH_x86 \
100 -define TARGET_OS_ARCH_windows_x86 \
101 -define TARGET_OS_FAMILY_windows \
102 -define TARGET_COMPILER_visCPP \
103 $(ProjectCreatorIncludesPRIVATE)
105 # Add in build-specific options
106 !if "$(BUILDARCH)" == "i486"
107 ProjectCreatorIDEOptions=$(ProjectCreatorIDEOptions) \
108 -platformName Win32 \
109 -define IA32 \
110 -ignorePath x86_64 \
111 -define TARGET_ARCH_MODEL_x86_32
112 !else
113 !if "$(BUILDARCH)" == "amd64"
114 ProjectCreatorIDEOptions=$(ProjectCreatorIDEOptions) \
115 -platformName x64 \
116 -define AMD64 \
117 -define _LP64 \
118 -ignorePath x86_32 \
119 -define TARGET_ARCH_MODEL_x86_64 \
120 -define TARGET_OS_ARCH_MODEL_windows_x86_64
121 !endif
122 !endif
124 ProjectCreatorIDEOptionsIgnoreCompiler1=\
125 -ignorePath_TARGET c1_
127 ProjectCreatorIDEOptionsIgnoreCompiler2=\
128 -ignorePath_TARGET src/share/vm/opto \
129 -ignorePath_TARGET src/share/vm/libadt \
130 -ignorePath_TARGET adfiles \
131 -ignoreFile_TARGET bcEscapeAnalyzer.cpp \
132 -ignoreFile_TARGET bcEscapeAnalyzer.hpp \
133 -ignorePath_TARGET chaitin \
134 -ignorePath_TARGET c2_ \
135 -ignorePath_TARGET runtime_ \
136 -ignoreFile_TARGET ciTypeFlow.cpp \
137 -ignoreFile_TARGET ciTypeFlow.hpp \
138 -ignoreFile_TARGET $(Platform_arch_model).ad
140 ##################################################
141 # Without compiler(core) specific options
142 ##################################################
143 ProjectCreatorIDEOptions=$(ProjectCreatorIDEOptions) \
144 $(ProjectCreatorIDEOptionsIgnoreCompiler1:TARGET=core) \
145 $(ProjectCreatorIDEOptionsIgnoreCompiler2:TARGET=core)
147 ##################################################
148 # JKERNEL specific options
149 ##################################################
150 ProjectCreatorIDEOptions=$(ProjectCreatorIDEOptions) \
151 -define_kernel KERNEL \
152 $(ProjectCreatorIDEOptionsIgnoreCompiler2:TARGET=kernel) \
153 -ignorePath_kernel src/share/vm/gc_implementation/parallelScavenge \
154 -ignorePath_kernel src/share/vm/gc_implementation/parNew \
155 -ignorePath_kernel src/share/vm/gc_implementation/concurrentMarkSweep \
156 -ignorePath_kernel src/share/vm/gc_implementation/g1 \
157 -ignoreFile_kernel attachListener.cpp \
158 -ignoreFile_kernel attachListener_windows.cpp \
159 -ignoreFile_kernel dump.cpp \
160 -ignoreFile_kernel dump_$(Platform_arch_model).cpp \
161 -ignoreFile_kernel forte.cpp \
162 -ignoreFile_kernel fprofiler.cpp \
163 -ignoreFile_kernel heapDumper.cpp \
164 -ignoreFile_kernel heapInspection.cpp \
165 -ignoreFile_kernel jniCheck.cpp \
166 -ignoreFile_kernel jvmtiCodeBlobEvents.cpp \
167 -ignoreFile_kernel jvmtiExtensions.cpp \
168 -ignoreFile_kernel jvmtiImpl.cpp \
169 -ignoreFile_kernel jvmtiRawMonitor.cpp \
170 -ignoreFile_kernel jvmtiTagMap.cpp \
171 -ignoreFile_kernel jvmtiTrace.cpp \
172 -ignoreFile_kernel jvmtiTrace.hpp \
173 -ignoreFile_kernel restore.cpp \
174 -ignoreFile_kernel serialize.cpp \
175 -ignoreFile_kernel vmStructs.cpp \
176 -ignoreFile_kernel g1MemoryPool.cpp \
177 -ignoreFile_kernel g1MemoryPool.hpp \
178 -ignoreFile_kernel psMemoryPool.cpp \
179 -ignoreFile_kernel psMemoryPool.hpp \
180 -ignoreFile_kernel gcAdaptivePolicyCounters.cpp \
181 -ignoreFile_kernel concurrentGCThread.cpp \
182 -ignoreFile_kernel mutableNUMASpace.cpp \
183 -ignoreFile_kernel ciTypeFlow.cpp \
184 -ignoreFile_kernel ciTypeFlow.hpp \
185 -ignoreFile_kernel oop.pcgc.inline.hpp \
186 -ignoreFile_kernel oop.psgc.inline.hpp \
187 -ignoreFile_kernel allocationStats.cpp \
188 -ignoreFile_kernel allocationStats.hpp \
189 -ignoreFile_kernel concurrentGCThread.hpp \
190 -ignoreFile_kernel gSpaceCounters.cpp \
191 -ignoreFile_kernel gSpaceCounters.hpp \
192 -ignoreFile_kernel gcAdaptivePolicyCounters.hpp \
193 -ignoreFile_kernel immutableSpace.cpp \
194 -ignoreFile_kernel mutableNUMASpace.hpp \
195 -ignoreFile_kernel mutableSpace.cpp \
196 -ignoreFile_kernel spaceCounters.cpp \
197 -ignoreFile_kernel spaceCounters.hpp \
198 -ignoreFile_kernel yieldingWorkgroup.cpp \
199 -ignoreFile_kernel yieldingWorkgroup.hpp \
200 -ignorePath_kernel vmStructs_ \
201 -ignoreFile_kernel $(Platform_arch_model).ad \
202 -additionalFile_kernel gcTaskManager.hpp
204 ##################################################
205 # Client(C1) compiler specific options
206 ##################################################
207 ProjectCreatorIDEOptions=$(ProjectCreatorIDEOptions) \
208 -define_compiler1 COMPILER1 \
209 $(ProjectCreatorIDEOptionsIgnoreCompiler2:TARGET=compiler1)
211 ##################################################
212 # Server(C2) compiler specific options
213 ##################################################
214 #NOTE! This list must be kept in sync with GENERATED_NAMES in adlc.make.
215 ProjectCreatorIDEOptions=$(ProjectCreatorIDEOptions) \
216 -define_compiler2 COMPILER2 \
217 -additionalFile_compiler2 $(Platform_arch_model).ad \
218 -additionalGeneratedFile_compiler2 $(HOTSPOTBUILDSPACE)/%f/generated/adfiles ad_$(Platform_arch_model).cpp \
219 -additionalGeneratedFile_compiler2 $(HOTSPOTBUILDSPACE)/%f/generated/adfiles ad_$(Platform_arch_model).hpp \
220 -additionalGeneratedFile_compiler2 $(HOTSPOTBUILDSPACE)/%f/generated/adfiles ad_$(Platform_arch_model)_clone.cpp \
221 -additionalGeneratedFile_compiler2 $(HOTSPOTBUILDSPACE)/%f/generated/adfiles ad_$(Platform_arch_model)_expand.cpp \
222 -additionalGeneratedFile_compiler2 $(HOTSPOTBUILDSPACE)/%f/generated/adfiles ad_$(Platform_arch_model)_format.cpp \
223 -additionalGeneratedFile_compiler2 $(HOTSPOTBUILDSPACE)/%f/generated/adfiles ad_$(Platform_arch_model)_gen.cpp \
224 -additionalGeneratedFile_compiler2 $(HOTSPOTBUILDSPACE)/%f/generated/adfiles ad_$(Platform_arch_model)_misc.cpp \
225 -additionalGeneratedFile_compiler2 $(HOTSPOTBUILDSPACE)/%f/generated/adfiles ad_$(Platform_arch_model)_peephole.cpp \
226 -additionalGeneratedFile_compiler2 $(HOTSPOTBUILDSPACE)/%f/generated/adfiles ad_$(Platform_arch_model)_pipeline.cpp \
227 -additionalGeneratedFile_compiler2 $(HOTSPOTBUILDSPACE)/%f/generated/adfiles adGlobals_$(Platform_arch_model).hpp \
228 -additionalGeneratedFile_compiler2 $(HOTSPOTBUILDSPACE)/%f/generated/adfiles dfa_$(Platform_arch_model).cpp \
229 $(ProjectCreatorIDEOptionsIgnoreCompiler1:TARGET=compiler2)
231 # Add in the jvmti (JSR-163) options
232 # NOTE: do not pull in jvmtiEnvRecommended.cpp. This file is generated
233 # so the programmer can diff it with jvmtiEnv.cpp to be sure the
234 # code merge was done correctly (@see jvmti.make and jvmtiEnvFill.java).
235 # If so, they would then check it in as a new version of jvmtiEnv.cpp.
236 ProjectCreatorIDEOptions=$(ProjectCreatorIDEOptions) \
237 -additionalGeneratedFile $(HOTSPOTBUILDSPACE)/%f/generated/jvmtifiles jvmtiEnv.hpp \
238 -additionalGeneratedFile $(HOTSPOTBUILDSPACE)/%f/generated/jvmtifiles jvmtiEnter.cpp \
239 -additionalGeneratedFile $(HOTSPOTBUILDSPACE)/%f/generated/jvmtifiles jvmtiEnterTrace.cpp \
240 -additionalGeneratedFile $(HOTSPOTBUILDSPACE)/%f/generated/jvmtifiles jvmti.h \
241 -additionalGeneratedFile $(HOTSPOTBUILDSPACE)/%f/generated/jvmtifiles bytecodeInterpreterWithChecks.cpp