Subject: HEADS UP: migration to fully dynamic linked "base" system
To: None <firstname.lastname@example.org>
From: Luke Mewburn <email@example.com>
Date: 08/26/2002 16:20:39
A `heads up'.
I will be switching NetBSD-current to have dynamically linked programs
in /bin and /sbin in the next day or so.
This will be achieved by changing the default definitions of SHLIBDIR,
and SHLINKDIR in <bsd.own.mk>, and removing "LDSTATIC?=-static" in
The user visible changes of this include:
+ /usr/libexec/ld.elf_so is moved to /lib/ld.elf_so.
A compatibility symlink is provided.
+ Shared libraries used by programs in /bin and /sbin have been
moved from /usr/lib to /lib. Compatibility symbolic links are
+ All programs in /bin and /sbin are now dynamically linked,
and can take advantage of dlopen(3).
+ /rescue/* recovery tools provided. These are a statically linked
crunchgen(1)-ed copy of the program in /bin, /sbin, and a few
others, to allow you to recover a system in the same manner that
you can with today's statically linked /bin and /sbin.
If the system is "hosed" to the point where /sbin/init won't
start (because /lib/libc.so.* is damaged, for example), boot
to single user using your machine's method of setting RB_ASKNAME
(usually "boot -sa"), and enter "/rescue/init" as the path to
init(8), and recover from there. You may need to prepend
/rescue to the path.
+ Reduction in disk space usage in `/'.
On a 1.6_BETA3/i386 system:
On a fully dynamic i386 system:
(The rescue tools are not strictly necessary, but they are
recommended and included here to show that even with them,
there is still a disk space saving).
+ Static linking of programs is still supported; just set
LDSTATIC=-static in the Makefile or make(1)'s environment.
Of course, such programs will not be able to benefit from
future features such as dynamic modules for nsswitch, locale,
authentication (PAM ?), etc.
I've tested an upgrade from an existing system to a fully dynamic
system (built with "./build.sh -D /"), as well as building a release
to a DESTDIR and then extracting the resultant sets, and it all works.
It is recommended that you have up to date rescue tools first.
Ensure that you have an up-to-date crunchgen(1), and then build and
install the rescue tools with something like:
make dependall install
If you just build & update with a "make" and "make install" in the top
level of /usr/src, you *MUST* install a shared linker into /lib, with
(build.sh is still the preferred method of updating).
In the unlikely event that the change to fully dynamic fails, you can use
the rescue tools to recover, as described above.