tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: ld compat linker warnings considered harmful



>> 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		mouse%rodents-montreal.org@localhost
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


Home | Main Index | Thread Index | Old Index