This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Vtable pointer verification, runtime library changes (patch 3 of 3)


Caroline! So nice to see this patch hit the public list, I really
enjoyed this Cauldron talk.

> 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 $@ 


>         * 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. 

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.

-benjamin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]