This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [PATCH] Vtable pointer verification, runtime library changes (patch 3 of 3)
On Mon, Jan 28, 2013 at 7:23 PM, Benjamin De Kosnik <bkoz@redhat.com> wrote:
>
> Caroline! So nice to see this patch hit the public list, I really
> enjoyed this Cauldron talk.
>
Thank you!! :-)
>> 2013-01-23 Caroline Tice <cmtice@google.com>
>>
>> * configure (predep_objects): Add vtv_start.o.
>> (postdep_objects): Add vtv_end.o.
>
> OK
>
>> * src/Makefile.am (libvtv__la_LIBADD): Add definition.
>> (CXXLINK): Add libtvt__la_LIBADD to the library search path;
>> add libvtv_init to list of linked in libraries.
>
> Hmm.
>
> autoreconf says:
> autoconf says:
>
> src/Makefile.am:77: variable `libvtv___la_LIBADD' is defined but no
> program or src/Makefile.am:77: library has `libvtv___la' as canonical
> name (possible typo)
>
> I think you mean this instead:
>
> diff --git a/libstdc++-v3/src/Makefile.am b/libstdc++-v3/src/Makefile.am
> index b367c3f..73736ed 100644
> --- a/libstdc++-v3/src/Makefile.am
> +++ b/libstdc++-v3/src/Makefile.am
> @@ -73,6 +73,10 @@ libstdc___la_LDFLAGS = \
>
> libstdc___la_LINK = $(CXXLINK) $(libstdc___la_LDFLAGS)
>
> +# XXX?
> +#libvtv___la_LIBADD = \
> +# $(top_builddir)/libsupc++/.libs
> +VTVFLAGS = -L$(top_builddir)/libsupc++/.libs
>
> # Use special rules for compatibility-ldbl.cc compilation, as we need
> to # pass -mlong-double-64.
> @@ -175,6 +179,7 @@ CXXLINK = \
> $(LIBTOOL) --tag CXX \
> $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
> --mode=link $(CXX) \
> + $(VTVFLAGS) --whole-archive -lvtv_init --no-whole-archive \
> $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS)
> -o $@
>
I think you're right. I will make that change.
>
>> * src/Makefile.in: Regenerate from Makefile.am.
>> * libsupc++/Makefile.in: Regenerate from Makefile.am.
>> * libsupc++/vtv_rts.cc: New file.
>> * libsupc++/vtv_malloc.h: New file.
>> * libsupc++/vtv_rts.h: New file.
>> * libsupc++/vtv_fail.h: New file.
>> * libsupc++/vtv_map.h: New file.
>> * libsupc++/vtv_set.h: New file.
>> * libsupc++/vtv_stubs.cc: New file.
>> * libsupc++/vtv_utils.cc: New file.
>> * libsupc++/vtv_utils.h: New file.
>> * libsupc++/vtv_init.cc: New file.
>> * libsupc++/vtv_malloc.cc: New file.
>> * libsupc++/Makefile.am (sources): Add vtv_rts.cc,
>> vtv_malloc.cc and vtv_utils.cc to the list.
>> (vtv_init_sources, vtv_stubs_soruces, libvtv_init_la_sources,
>> libvtv_stubs_la_sources): New definitions.
>> * config/abi/pre/gnu.ver: Add vtable verification runtime
>> functions to the list of globally visible symbols.
>
>
> OK. Thanks for commenting these sources so well.
You're welcome. Does this mean that once GCC 4.9 opens up, these
changes are approved (with the Makefile.am change mentioned above)?
>
> Are you planning on submitting some internals docs, or some kind of
> end-user description of this feature, perhaps with a NEWS update? I
> think some kind of overview for the internals docs is entirely
> appropriate.
>
I haven't given it a lot of thought. This is the first time I've ever
added such a major new feature, so I'm unsure about the right way to
document it, and I'd appreciate guidance on that. Exactly what do you
think I ought to put where?
-- Caroline Tice
cmtice@google.com
> -benjamin
>