very slow start of mc (4.6.0) on FreeBSD5.1-Release
Philipp Thomas
pthomas at suse.de
Thu Jul 3 14:32:22 UTC 2003
* Rob Ristroph (rgr at sdf.lonestar.org) [20030702 20:21]:
> Perhaps in a future version of my floppy I might change mc to not call
> gethostbyname() if it can't find that library; if so I will submit a
> patch.
When any of the resolving functions like gethostbyname from glibc are
called, glibc in turn will call the necessary libnss modules, based on
what's configured in /etc/nsswitch.conf. So mc *can't* detect whether or not
the libnss modules are present.
Compiling a statically linked mc is also out of the question because the
libnss* modules are always loaded dynamically, making the program only
semi-static (rpm for instance has this problem). So on an ELF system that
uses glibc 2.X, you can't call *any* of the resolving functions if you want
to have a true statically linked program. Work is underway for future
versions of glibc to make the linker issue errors in case this is tried.
So your only choice would be to either compile your own mc with all getXbyY
calls removed or put only libnss_files.so together with a suitable
/etc/nsswitch.conf on your floppy.
Philipp
--
Philipp Thomas <pthomas at suse.de>
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nuremberg, Germany
More information about the mc-devel
mailing list