On May 20, 2001, Alexandre Oliva <[EMAIL PROTECTED]> wrote:
> This appears to be a bug that triggers in a very particular
> condition: when the environment is empty. It doesn't trigger with
> 1.12 because it just doesn't depend on librt.so.
Nope. It didn't trigger on 1.12 because it wasn't linked with GNU ld.
The problem is that GNU ld sets the dynamic linker as
/usr/lib/libc.so.1, whereas Sun ld sets it to /usr/lib/ld.so.1. Even
though Sun officially supports both, according to a friend of mine at
Sun, the one chosen by GNU ld fails because it assumes the environment
contains at least one non-NULL entry. My friend is working on a fix
for Solaris/x86 libc; I'm not sure we (GNU developers) are going to
fix GCC or GNU ld, or both, or neither, since the work-around is
simple: just link the program using
`-Wl,--dynamic-linker,/usr/lib/ld.so.1', or use Sun ld, or make sure
the environment is never empty, or wait for a patch from Sun.
--
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