Re: very slow start of mc (4.6.0) on FreeBSD5.1-Release
- From: rgr sdf lonestar org (Rob Ristroph)
- To: mc-devel gnome org
- Subject: Re: very slow start of mc (4.6.0) on FreeBSD5.1-Release
- Date: 03 Jul 2003 15:17:07 -0500
>>>>> "Philipp" == Philipp Thomas <pthomas suse de> writes:
Philipp>
Philipp> * Rob Ristroph (rgr 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.
Philipp>
Philipp> When any of the resolving functions like gethostbyname from
Philipp> glibc are called, glibc in turn will call the necessary
Philipp> libnss modules, based on what's configured in
Philipp> /etc/nsswitch.conf. So mc *can't* detect whether or not the
Philipp> libnss modules are present.
Philipp>
Philipp> Compiling a statically linked mc is also out of the question
Philipp> because the libnss* modules are always loaded dynamically,
Philipp> making the program only semi-static (rpm for instance has
Philipp> this problem). So on an ELF system that uses glibc 2.X, you
Philipp> can't call *any* of the resolving functions if you want to
Philipp> have a true statically linked program. Work is underway for
Philipp> future versions of glibc to make the linker issue errors in
Philipp> case this is tried.
Philipp>
Philipp> So your only choice would be to either compile your own mc
Philipp> with all getXbyY calls removed or put only libnss_files.so
Philipp> together with a suitable /etc/nsswitch.conf on your floppy.
Philipp>
Philipp> Philipp
This explanation clears up a lot for me. I had presumed it was mc
that was doing the manual loading of the file -- I had run strace and
seen the dlopen("/lib/libnss_<something>.so") call.
I will most likely continue to use the official mc, but squeeze the
libnss stuff on the floppy somehow.
Thanks,
--Rob
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]