Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
029f1b45
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
029f1b45
编写于
2月 16, 2011
作者:
O
ohair
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
7010594: Add /SAFESEH to links on windows to verify safe exceptions
Reviewed-by: alanb
上级
986711c7
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
54 addition
and
4 deletion
+54
-4
make/common/Defs-windows.gmk
make/common/Defs-windows.gmk
+7
-1
make/common/shared/Defs-windows.gmk
make/common/shared/Defs-windows.gmk
+47
-3
未找到文件。
make/common/Defs-windows.gmk
浏览文件 @
029f1b45
...
@@ -359,7 +359,13 @@ ifeq ($(CC_VERSION),msvc)
...
@@ -359,7 +359,13 @@ ifeq ($(CC_VERSION),msvc)
# VS2008 has bufferoverflow baked in:
# VS2008 has bufferoverflow baked in:
LFLAGS_VS2008 =
LFLAGS_VS2008 =
# VS2010, always need safe exception handlers, not needed on 64bit
ifeq ($(ARCH_DATA_MODEL), 32)
LFLAGS_VS2010 = -SAFESEH
else
LFLAGS_VS2010 =
LFLAGS_VS2010 =
endif
# LFLAGS are the flags given to $(LINK) and used to build the actual DLL file
# LFLAGS are the flags given to $(LINK) and used to build the actual DLL file
BASELFLAGS = -nologo /opt:REF /incremental:no
BASELFLAGS = -nologo /opt:REF /incremental:no
...
...
make/common/shared/Defs-windows.gmk
浏览文件 @
029f1b45
...
@@ -772,9 +772,20 @@ else
...
@@ -772,9 +772,20 @@ else
BANNED_DLLS=msvcp100[.]dll|msvcr100d[.]dll|msvcrtd[.]dll
BANNED_DLLS=msvcp100[.]dll|msvcr100d[.]dll|msvcrtd[.]dll
endif
endif
# Macro to check it's input file for banned dependencies and verify the
# Check for /safeseh (only used on 32bit)
# binary was built properly. Relies on process exit code.
define binary_file_safeseh_verification # binary_file
define binary_file_verification # binary_file
( \
$(ECHO) "Checking for /SAFESEH usage in: $1" && \
if [ "`$(DUMPBIN) /loadconfig $1 | $(EGREP) -i 'Safe Exception Handler Table'`" = "" ] ; then \
$(ECHO) "ERROR: Did not find 'Safe Exception Handler Table' in loadconfig: $1" ; \
$(DUMPBIN) /loadconfig $1 ; \
exit 6 ; \
fi ; \
)
endef
# Check for /NXCOMPAT usage
define binary_file_nxcompat_verification # binary_file
( \
( \
$(ECHO) "Checking for /NXCOMPAT usage in: $1" && \
$(ECHO) "Checking for /NXCOMPAT usage in: $1" && \
if [ "`$(DUMPBIN) /headers $1 | $(EGREP) -i 'NX compatible'`" = "" ] ; then \
if [ "`$(DUMPBIN) /headers $1 | $(EGREP) -i 'NX compatible'`" = "" ] ; then \
...
@@ -782,12 +793,24 @@ define binary_file_verification # binary_file
...
@@ -782,12 +793,24 @@ define binary_file_verification # binary_file
$(DUMPBIN) /headers $1 ; \
$(DUMPBIN) /headers $1 ; \
exit 7 ; \
exit 7 ; \
fi ; \
fi ; \
)
endef
# Check for /DYNAMICBASE usage
define binary_file_dynamicbase_verification # binary_file
( \
$(ECHO) "Checking for /DYNAMICBASE usage in: $1" && \
$(ECHO) "Checking for /DYNAMICBASE usage in: $1" && \
if [ "`$(DUMPBIN) /headers $1 | $(EGREP) -i 'Dynamic base'`" = "" ] ; then \
if [ "`$(DUMPBIN) /headers $1 | $(EGREP) -i 'Dynamic base'`" = "" ] ; then \
$(ECHO) "ERROR: Did not find 'Dynamic base' in headers: $1" ; \
$(ECHO) "ERROR: Did not find 'Dynamic base' in headers: $1" ; \
$(DUMPBIN) /headers $1 ; \
$(DUMPBIN) /headers $1 ; \
exit 8 ; \
exit 8 ; \
fi ; \
fi ; \
)
endef
# Check for banned dll usage
define binary_file_dll_verification # binary_file
( \
$(ECHO) "Checking for banned dependencies in: $1" && \
$(ECHO) "Checking for banned dependencies in: $1" && \
if [ "`$(DUMPBIN) /dependents $1 | $(EGREP) -i '$(BANNED_DLLS)'`" != "" ] ; then \
if [ "`$(DUMPBIN) /dependents $1 | $(EGREP) -i '$(BANNED_DLLS)'`" != "" ] ; then \
$(ECHO) "ERROR: Found use of $(BANNED_DLLS)"; \
$(ECHO) "ERROR: Found use of $(BANNED_DLLS)"; \
...
@@ -797,6 +820,27 @@ define binary_file_verification # binary_file
...
@@ -797,6 +820,27 @@ define binary_file_verification # binary_file
)
)
endef
endef
# Macro to check it's input file for properly built executables.
# Relies on process exit code. Different for 32bit vs 64bit.
ifeq ($(ARCH_DATA_MODEL),32)
define binary_file_verification # binary_file
( \
$(call binary_file_safeseh_verification,$1); \
$(call binary_file_nxcompat_verification,$1); \
$(call binary_file_dynamicbase_verification,$1); \
$(call binary_file_dll_verification,$1); \
)
endef
else
define binary_file_verification # binary_file
( \
$(call binary_file_nxcompat_verification,$1); \
$(call binary_file_dynamicbase_verification,$1); \
$(call binary_file_dll_verification,$1); \
)
endef
endif
else
else
# Macro to check it's input file for banned dependencies and verify the
# Macro to check it's input file for banned dependencies and verify the
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录