Subject: Re: multibyte locale stuff
To: None <>
From: Todd Vierling <>
List: tech-userlevel
Date: 01/24/2001 14:30:47
On Thu, 25 Jan 2001 wrote:

: >	- libc.a (for static linked binary) can enjoy singlebyte locale only.
: >	- (for shared binary) can enjoy multibyte locale library
: >	  support.  multibyte locale support needs /usr/lib/runemodule/*.so to
: >	  get dlopen'ed at runtime.
: 	it was found that, with older crt0.o, it is impossible to use dlopen()
: 	from within libc (unless the user application code uses dlopen already).
: 	if we put reference to libc, older binaries dies with unresolvable
: 	symbol.  i'll try to hack it up, or change some strategy.  anyway,
: 	it won't appear too soon.  sorry about the noise.

Static binaries plus dlopen() is a very tricky (and in some cases completely
losing) proposition.  You need a dynamic linker (/usr/libexec/ld.{elf_,}so)
to make that work.  It's best not to attempt to use dlopen() from static

Note that e.g. Solaris worked around this by providing another copy of the
dynamic linker in /etc/lib, along with some modules.  Such binaries are
linked "dynamically", but with the special dynamic linker in /etc/lib, and
linked against the ("static") libc.a.  Therefore these not-really-static
binaries had no dependency on or /usr, but could still dlopen()

-- Todd Vierling <>  *  Wasabi NetBSD:  Run with it.
-- NetBSD 1.5 now available on CD-ROM  --