[PATCH] Vtable pointer verification, main gcc changes (patch 2 of 3)

Caroline Tice cmtice@google.com
Wed Jan 23 22:36:00 GMT 2013

I have made the requested changes to the previous patches I submitted
for the vtable verification feature.  As requested, I have broken this
into three patches:  the C++ front end changes, the main gcc changes,
and the runtime library changes.  Here are the main gcc changes for
the vtable verification features.

-- Caroline Tice


2013-01-23  Caroline Tice  <cmtice@google.com>

	* ligbcc/config.host (extra_parts):  Add vtv_start.o and vtv_end.o to
	the list.
	* libgcc/Makefile.in: Add definitin for gcc_srcdir; add rules for
	building vtv_start.o and vtv_end.o.
	* vtv_start.c:  New file.
	* tree.h: Add extern function declaration for save_vtable_map_decl.
	* tree-pass.h (pass_vtable_verify): Declare new pass.
	* vtv_end.c:  New file.
	* timevar.def (TV_VTABLE_VERIFICATION):  Declare new time var.
	* flag-types.h (vtv_priority):  New enum, for values for new
	'-fvtable-verify=' option.
	* tree-vtable-verify.c:  New file, contains vtable verification tree
	* tree-vtable-verify.h: New file.
	* common.opt: (fvtable-verify=): New option. Also define vtv_priority
	values for the option.
	* varasm.c (assemble_variable): Add code for handling variables that
	go into the ".vtable_map_vars" section.
	(assemble_vtv_perinit_initializer):  New function.
	(default_section_type_flags):  Add SECTION_LINKONCE to
	".vtable_map_vars" section items.
	* output.h (assemble_vtv_preinit_initializer):  External function decl.
	* Makefile.in (OBJS):  Add tree-vtable-verify.o to list of object
	(tree-vtable-verify.o):  Add rule for building object file.
	(GTFILES): Add tree-vtable-verify.c to list of files that use GCC's
	garbage collector.
	* passes.c (init_optimization_pass): Add pass_vtable_verify.
	* config/gnu-user.h: Add vtv_start.o to STARTFILE_SPEC if
	fvtable-verify is present; Add vtv_end.o to ENDFILE_SPEC if
	fvtable-verify is present.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fsf-vtable-verification.v4.gcc-main.patch
Type: application/octet-stream
Size: 68298 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20130123/ec919f0c/attachment.obj>

More information about the Gcc-patches mailing list