Subject: lib/11931: libc linker warnings are issued when inappropriate/unnecessary
To: None <gnats-bugs@gnats.netbsd.org>
From: None <cgd@netbsd.org>
List: netbsd-bugs
Date: 01/10/2001 16:17:13
>Number: 11931
>Category: lib
>Synopsis: libc linker warnings are issued when inappropriate/unnecessary
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: lib-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Jan 10 16:17:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: Chris Demetriou
>Release: 1.5 (clean install), i386
>Organization:
>Environment:
NetBSD new-speedy.demetriou.com 1.5 NetBSD 1.5 (GENERIC) #6: Wed Jan 3 23:42:44 PST 2001 cgd@new-speedy.demetriou.com:/a/src/usr/src/sys/arch/i386/compile/GENERIC i386
recent install of 1.5, with no modifications to userland binaries.
>Description:
the linker emits warnings when certain symbols are used, e.g. glob(),
to indicate that a header wasn't properly included and therefore
(probably incorrectly) the older, binary-compatiblity version of
of the symbol is being used. e.g. for glob:
warning: reference to compatibility glob(); include <glob.h> for correct reference
Unfortunately, it also does that when the library's definition of
the symbol is not used, but another object being linked provides
a symbol of the same name. See below for an example.
>How-To-Repeat:
% uname -a
NetBSD new-speedy.demetriou.com 1.5 NetBSD 1.5 (GENERIC) #6: Wed Jan 3 23:42:44 PST 2001 cgd@new-speedy.demetriou.com:/a/src/usr/src/sys/arch/i386/compile/GENERIC i386
% cat > bar.c << __EOF
int glob;
main() { printf("%d\n", glob); }
% cc bar.c
/tmp/cci95EPF.o: In function `main':
/tmp/cci95EPF.o(.text+0x4): warning: reference to compatibility glob(); include <glob.h> for correct reference
obviously, that's not correct; it's not (or shouldn't be) using
the libc glob.
>Fix:
unknown. may be an issue with the way the warning messages are
inserted into libc objects, or may be an issue with the way the
messages are selected for emission by the linker (i.e., an issue
in the linker itself).
>Release-Note:
>Audit-Trail:
>Unformatted: