[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Libtool hassle on Solaris...

From: Alexandre Oliva
Subject: Re: Libtool hassle on Solaris...
Date: 31 Jan 2001 01:27:57 -0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Crater Lake)

On Jan 29, 2001, "Gary V. Vaughan" <address@hidden> 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 (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
Red Hat GCC Developer                  address@hidden,}
CS PhD student at IC-Unicamp        address@hidden,}
Free Software Evangelist    *Please* write to mailing lists, not to me

reply via email to

[Prev in Thread] Current Thread [Next in Thread]