Subject: -lwrap and externals
To: None <tech-toolchain@NetBSD.ORG>
From: Martin Husemann <martin@rumolt.teuto.de>
List: tech-toolchain
Date: 04/02/2000 22:07:42
I think this has been discussed on some of the NetBSD lists before:

Libwrap has a (IMHO) broken API requiring externals by the caller:

int allow_severity, deny_severity;

So: as soon as I add -lwrap to the command line, the program won't compile
if it doesn't export that symbols (at least on i386/ELF -current).

The questionable part about this is: if my program actually doesn't use
anything from libwrap and the linker optimization is expected to throw out
any reference to this library, should the main program still be required
to export that symbols?

This broke an (3d party) autoconfig script for me today. I fixed it by
removing -lwrap from LIBS and adding it back later just before outputing
the Makefile.

Anyway, this sounds like a bug in the i386/ELF linker to me...


Martin