David Douthitt wrote:
>
> Matthew Schalit wrote:
> >
> > David Douthitt wrote:
> > >
> > > Does anyone have a really good understanding of what each system library
> > > (found in /lib/lib* and /usr/lib/lib*) is for?
> > >
> > > I'm still trying to get a good idea of libraries such as libresolv,
> > > libdb, libdl, libnsl, ...
> > >
> > > I think that:
>
> > > * libnsl appears to be something related to NIS (can be removed??)
> >
> > NIS is only part of it. RPC is in there too, and so is cs and so
> > are network directory services and some xti stuff too. It's called
> > the Network Sevices Library and contains many functions that are used
> > by various transport protocols.
>
> Without portmapper, RPC and NIS are useless, right?
I don't rightly know, but I recall the issue being discussed
on the Lrp list last year.
> What is CS? XTI? And I thought "network directory services" was
> taken care of by DNS, libresolv, and libnss*..?
Connection Server. X/OPEN Transport Interface.
My skiming of the libnsl info I found pointed to subsections
that handled various aspects, like
cr1 cr1 authentication library
cs Connection Server library interface
des Data Encryption Standards library
netdir Network Directory functions. This contains look-up functions and the access
point to network
directory libraries for various network transports.
netselect Network Selection routines. These functions manipulate the /etc/netconfig
file and return entries.
nsl UnixWare® Transport Interface. These functions support both the older TLI
semantics and the
newer semantics of the X/OPEN Transport Interface (XTI). The library entry points
have their
traditional names for the TLI functions, such as t_open(3xti). For the XTI
functions, however, the
entry points have new names, such as _xti_open. When applications are compiled,
the XTI function
names are translated to the XTI entry points by macros in the include file
<xti.h>.
rexec REXEC library interface
rpc User-level Remote Procedure Call library
yp Network Information Service functions
The libsocket library has two components:
inet containing the Internet library routines, and
socket containing the Socket Interface routines.
Of course that was UnixWare stuff, but hey, you do UnixWare, right :)
Isn't Linux a UnixWare derivative, anyway? Heh.
> > > * libdb is.... what? (it's part of glibc...)
> >
> > Libdb is the Berkeley DB database functions that are now maintained
> > by Sleepycat Software at http://www.sleepycat.com/
> > dbopen(), dbhash(), weird stuff like that, often used with mysql.
>
> Do LRP-based systems really need this one? What would break if it was
> gone?
I'm not familiar enough with the code to know how much Linux uses it.
It sounds like it's a rare one. I didn't realize it came stock with Linux
until you mentioned it? Why not yank it and see :)
> > > * libuuid (a part of e2fsprogs) seems to be some sort of utilities for
> > > e2fs; can this be removed?
> >
> > Utilities for managing ext2 filesystem.
>
> So if libuuid was missing it wouldn't matter? At least, if there is no
> e2fs filesystems to be had...
I thought it was for ext2, but Lrp doesn't use either, right?
So it sounds optional.
> I finally started figuring out nm and objdump - but I'm still trying to
> figure out how to read their output. The help files (man page, info
> pages, Linux howtos) all talk in terms of "header files" when what I
> really wanted was an answer to this question: "What functions does this
> library provide to other binary programs?"
>
> It looks like a proper reading of nm and objdump will answer this...
There are two things you can do. First, for applications, you use ldd.
Let's say you want to know what scp depends on, like does it use libnsl.so?
Well you can check that with
ldd scp
Secondly, for shared libraries you use nm. On UnixWare, you
can use
nm libnsl.so | grep FUNC | less
and that will list all the functions, as SCO's nm has a field
that lists what it finds by type. FILE, and FUNC, are some of
the types.
On Linux, I figure you'd be using GNU-binutils which includes nm.
Then I'd do something like
nm libnsl.so | grep " T " > /tmp/pout
nm libnsl.so | grep " t " >> /tmp/pout
It appears that all functions are listed with a ' T ' or a ' t ' in the
second column of the GNU-nm output. The space I used between
the quotations and the letter will keep your grep from
grabbing functions with the letter T or t in their name.
> > I figured at some point, developers would be stripping the necessary
> > functions out of the libraries to make them smaller.
>
> Dave already did that with libncurses - but first thing I did was put
> full ncurses back in :-)
Hah.
> How do you go about stripping libraries anyway? If libnsl is necessary
> it would be a good candidate, as NIS and RPC can be ripped out...
I thought that people remove the useless functions from the orginal
source code, then recompile.
Take it easy,
Matt
_______________________________________________
Leaf-devel mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/leaf-devel