Subject: Re: Linker bug of the day?
To: Simon Burge <simonb@netbsd.org>
From: Todd Vierling <tv@pobox.com>
List: port-mips
Date: 04/27/1999 07:44:45
On Tue, 27 Apr 1999, Simon Burge wrote:
: Trying to test a nsswitch change on my 1.4 pmax, I get the following
: (I've indented the output of each command so it's a tad easier to read):
You wouldn't happen to have an older libc.a than your libc.so, would you?
: mona:/var/tmp 242> cc -static -o foo foo.c /usr/lib/libc.a
This links everything with libc.a (the last arg is redundant)...
: mona:/var/tmp 244> cc -o foo foo.c /usr/lib/libc.a
...while this links the first pass with libc.a and the second pass with
libc.so (the "-lc" tacked on to the end by gcc implies use of libc.so to
resolve undefined symbols in a previous translation unit).
If the answer to my first question is "yes," this is not a bug, as linking
with libc.a without -static has undefined behavior.
--
-- Todd Vierling (Personal tv@pobox.com; Bus. todd_vierling@xn.xerox.com)