Subject: dynamic linker/loader problem
To: None <>
From: Manuel Bouyer <>
List: tech-toolchain
Date: 03/25/2003 21:57:04
OK, I think I tracked down the problem of perl not building properly
on my sgimips. Background: I'm seeing a different behavior of the build process
on i386 and sgimips. Note that I'm running current on the sgimips.

In the build process, a miniperl binary is built, which is a perl with
restricted functionalities. This binary is linked against, which
will also be used by the final perl binary.
Parts of miniperl are build from the same sources as libperl, but with #defines
which restricts functionalities. Because of this, Perl_ck_glob() is included
in, and also in miniperl where it just return false.
Now the problem is that on my sgimips, when miniperl is run the
Perl_ck_glob() from libperl is used instead of the one in miniperl, and
this results in lossage as are the bits required for the full-featured
Perl_ck_glob() are not yet available.

I noticed that nm doens't give the same type for the symbol on i386 and
sgimips, I don't know if it's relevant:
sgimips# nm miniperl | grep Perl_ck_glob
6003c2d0 A Perl_ck_glob
00419b30 A Perl_ck_glob
i386# nm miniperl | grep Perl_ck_glob
00043da8 T Perl_ck_glob
08057cd0 T Perl_ck_glob

Any idea ?
I've the log of the make on both i386 and sgimips, if further details
are needed. The only difference I can see is that sgimips is using -g in
addition to other flags. The link phase of is the same.

Manuel Bouyer, LIP6, Universite Paris VI. 
     NetBSD: 24 ans d'experience feront toujours la difference