From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Stallman To: rh@unifix.de Cc: wilson@cygnus.com, ian@cygnus.com, drepper@cygnus.com, dm@sgi.com, gcc2@cygnus.com, gas2@cygnus.com Subject: Re: global vars and symbol visibility for mips32/elf Date: Wed, 14 Aug 1996 23:44:00 -0000 Message-id: <199608150644.CAA03376@psilocin.gnu.ai.mit.edu> References: X-SW-Source: 1996/msg00101.html To my best knowledge it never did, as optind is normally initialized (e.g. to 1) and not a common but a data definition, so that all commons with this name are resolved against the definition in the library. optind in that test program is a common symbol. A common symbol is not undefined, and there is no need for ld to resolve it. Perhaps some ld programs treat a common symbol as undefined in this situation. If so, that seems like a bug to me. If a symbol such as optind is common, and a library member contains a definition of optind, that in itself should not cause that library member to be linked in. Implementing this behavior will fix that test case. If shared libraries are made to mimic unshared libraries as regards which definitions are taken from them, that test cae will work with shared libraries too.