Re: ld compat linker warnings considered harmful

Mouse <[email protected]>
Newsgroups gmane.os.netbsd.devel.toolchain
Message-ID <[email protected]>
>> In short, a program just doing 'exit' is linked against libgssapi
>> (or libroken, both work), and the linker complains:

>> # gcc -o a a.c -lgssapi
>> ld: /usr/lib/libutil.so.7: warning: warning: reference to compatibility login_getpwclass(); include <login_cap.h> for correct reference
>> [...]

>> No function from gssapi (or roken) is called, so nothing can call
>> libutil and need the compat header.

> The core issue seems to be that libutil really does refer to
> __login_getpwclass50, or at least nm says it does.

libutil.a or .so?  One of the issues I see with .so libraries is that
they are all-or-nothing; there is no way to bring in only the part of a
.so that's actually part of the call graph.

I don't know whether that's what's behind this, but it's something to
at least think about.

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		[email protected]
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.