Re: nlist() and ELF

Systemkennung Linux (
Sun, 27 Oct 1996 18:15:33 +0100 (MET)

> On Sun, 27 Oct 1996, Bryn Paul Arnold Jones wrote:
> > > I found that nnrpd would not link because of the absence of nlist().
> > > Although there is a header (<nlist.h>) that defines this, nlist.c
> > > seems not to be included in libc if it is compiled for an ELF system.
> > > This is presumably because nlist.c only deals with a.out.
> > >
> > > Has anyone written nlist.c for ELF?
> >
> > Yes, it's in libelf, add -lelf to the cflags in the Makefile...
> But I can't compile libelf-0.6.4 from source with Linux-2.1.5 and
> gcc, libc-5.4.10 etc...

nnrpd only needs nlist for the load average limiting functionality.
You can disable it in INN's config/ file in which case INN
will build with no problems.

The real fix is to add support for Linux's proc filesystem to
nnrpd/loadavg.c. The nlist approach is broken because it requires
makeing /dev/kmem accessible to nnrpd with no real reason for it.
Using nlist implies also that the nnrpd knows the filename of the
kernel image just running and that nnrpd knows about how load average
data is presented in the kernel. Not nice ...

A good example for a getloadaverage function is available in GNU make 3.74.