symbol versioning, take 2

Phil Edwards phil@jaj.com
Wed Feb 13 15:47:00 GMT 2002


On Wed, Feb 13, 2002 at 05:47:23PM -0500, Phil Edwards wrote:
> The idea behind the tests and the name of the version script is that,
> if someone wants to provide a script which does not require GNU ld, we
> can drop that in config/linker-map.foo and --enable-symvers will DTRT.
> (Also note that writing such a script should be easier than what I said it
> would be earlier, since the person would not have to work from scratch.
> Simply mangling and expanding the symbols in linker-map.gnu is all that
> would be required.  A simple matter of programming.)

I've been asked some questions in private email; the answers should be
archived.

1) No, at the point I don't plan to work on such a super-portable version
   script myself, although I would help anyone who tried.

2) "If it's a simple matter of programming, why aren't you doing it?"
   For those who didn't recognize it:
   http://www.tuxedo.org/~esr/jargon/html/entry/SMOP.html

3) This problem has been partially solved before; recall that the libgcc
   setup is (quoting from my previous makefile) something like

        linker.map: ${top_srcdir}/symbols.ver ${libstdc___la_OBJECTS}
               { ${NM} -pg .libs/*.o ../libmath/.libs/libmath.a \
                    ../libsupc++/.libs/libsupc++convenience.a; \
                    echo '%%'; cat ${top_srcdir}/symbols.ver; \
               } | awk -f ${top_srcdir}/../gcc/mkmap-symver.awk > tmp-$@
               mv tmp-$@ $@

   That awk script certainly works; it's just the input ("symbols.ver")
   which needs to be constructed beforehand.


Phil

-- 
If ye love wealth greater than liberty, the tranquility of servitude greater
than the animating contest for freedom, go home and leave us in peace.  We seek
not your counsel, nor your arms.  Crouch down and lick the hand that feeds you;
and may posterity forget that ye were our countrymen.            - Samuel Adams



More information about the Libstdc++ mailing list