On Jan 29, 2001, "Gary V. Vaughan" <[EMAIL PROTECTED]> wrote:

>  - don't specify -no-undefined (so -z text is not used)

Actually, you've just uncovered a bug in libtool.  `-z defs' is the
appropriate -no-undefined flag, even though -z text would get a very
similar behavior, but for the wrong reasons.  The latter forces an
error in case any relocation remains in a read-only section.  So, -z
text wouldn't have caught a non-const pointer initialized to some
variable external to a shared library, whereas -z defs does.  I've
checked that it's documented in Solaris 2.5 linker man-pages.  I don't
know how far back that goes, though.

-z text is implicitly used by GCC when creating shared libraries,
unless -mimpure-text is given at compile time.  That's probably one of
the reasons why we don't use GCC for linking on Solaris.  We probably
could, if GCC supports -mimpure-text.  When not using GCC, we can
probably just use the compiler.

>  - link against libsnprintfv.la (the PIC library)

This is certainly The Right Thing (TM) to do.

>  - use GNU ld to link
 
Just because GNU ld disregards `-z text', instead of properly
implementing it.  As soon as it is fixed, this would no longer work.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

_______________________________________________
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool

Reply via email to