This is the mail archive of the firstname.lastname@example.org mailing list for the gas2 project.
|Index Nav:||[Date Index] [Subject Index] [Author Index] [Thread Index]|
|Message Nav:||[Date Prev] [Date Next]||[Thread Prev] [Thread Next]|
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.