aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaroline Tice <cmtice@google.com>2012-06-04 18:15:38 +0000
committerCaroline Tice <cmtice@google.com>2012-06-04 18:15:38 +0000
commitd6675235b3e434c762aeb05268b3dfd95e25f40c (patch)
tree3d67387f3bcf0c90c460f1ef42b9a740364c045b
parent3cbcff5b300a28b72f815ae0d1ebe53f23d3b102 (diff)
Make sure vtable verification is off by default.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/google/gcc-4_6-mobile@188197 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--vtable-security/ChangeLog.vtable-security21
-rw-r--r--vtable-security/gcc/common.opt2
-rw-r--r--vtable-security/gcc/flag-types.h1
3 files changed, 22 insertions, 2 deletions
diff --git a/vtable-security/ChangeLog.vtable-security b/vtable-security/ChangeLog.vtable-security
index 79c1d9780b6..2f774046e2d 100644
--- a/vtable-security/ChangeLog.vtable-security
+++ b/vtable-security/ChangeLog.vtable-security
@@ -1,9 +1,28 @@
+2012-06-04 Caroline Tice <cmtice@google.com>
+
+ * gcc/flag-types.h (enum vtv_priority): Add VTV_NO_PRIORITY,
+ to allow the flag to be turned off.
+ * gcc/common.opt (fvtable-verify): Set the default
+ initialization to VTV_NO_PRIORITY, so the vtable verification
+ is not turned on by default.
+
+2012-06-03 Caroline Tice <cmtice@google.com>
+
+ * gcc/cp/decl2.c (cp_write_global_declarations): Change vtable
+ initializaiton priority to MAX_RESERVED_INIT - 1; Add code to
+ put initializer in .preinit_array, if specified by flag.
+ * gcc/flag-tyeps.h (enum vtv_priority): Add new enum.
+ * gcc/common.opt (fvtable-verify): Modify flag to take an enum
+ argument. Add the enum information for vtv_priority enums.
+ * gcc/varasm.c (assemble_vtv_preinit_initializer): New function.
+ * gcc/output.h (assemble_vtv_preinit_initializer): New function decl.
+
2012-06-03 Caroline Tice <cmtice@google.com>
* gcc/config/i386/i386.c (ix86_vtable_security_code_end): Remove
function.
(ix86_code_end): Remove call to ix86_vtable_security_code_end.
-
+
2012-06-03 Caroline Tice <cmtice@google.com>
* gcc/temp-libgcc.cc (__VerifyVtablePointer): Put hack back in
diff --git a/vtable-security/gcc/common.opt b/vtable-security/gcc/common.opt
index 28d72ccc527..ee82a60461c 100644
--- a/vtable-security/gcc/common.opt
+++ b/vtable-security/gcc/common.opt
@@ -2254,7 +2254,7 @@ EnumValue
Enum(symbol_visibility) String(protected) Value(VISIBILITY_PROTECTED)
fvtable-verify=
-Common Joined RejectNegative Enum(vtv_priority) Var(flag_vtable_verify) Init(VTV_STANDARD_PRIORITY)
+Common Joined RejectNegative Enum(vtv_priority) Var(flag_vtable_verify) Init(VTV_NO_PRIORITY)
Validate vtable pointers before using them.
Enum
diff --git a/vtable-security/gcc/flag-types.h b/vtable-security/gcc/flag-types.h
index 740dc3515e5..a311502ae06 100644
--- a/vtable-security/gcc/flag-types.h
+++ b/vtable-security/gcc/flag-types.h
@@ -214,6 +214,7 @@ enum opt_info_verbosity_levels {
/* flag_vtable_verify initialization levels. */
enum vtv_priority {
+ VTV_NO_PRIORITY = 0, /* I.e. Do NOT do vtable verification. */
VTV_STANDARD_PRIORITY = 1,
VTV_PREINIT_PRIORITY = 2
};