This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: static lib drops objects with side-effects


On Tue, 11 Feb 2003, Zack Weinberg wrote:
> This reminds me that I have wanted for some time to complain about the
> converse behavior: if you are using shared objects and you put say -lm
> on the link line, a NEEDED entry for libm.so will appear in the linked
> object even if libm.so doesn't satisfy undefined symbol references.  I
> consider this to be wrong, because people tend to throw libraries onto
> their link lines just because they exist, assuming that ld will ignore
> them if they don't provide any useful symbols.

You might have considered it but anyway: this means a noticeable
functionality change.  I think that with your proposed change,
if you had an undefined weak in your program, and a new version
of the DSO has a definition of that symbol, you'll notice an ld
functionality change, requiring relinking the program to get the
"old" behavior.  Right, the major version on the DSO should have
been updated for such a change.  Still, a change in behavior,
wanted or not, obscure or not.

brgds, H-P


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]