PATCH: Don't warn defintion overrides indirect versioned symbol
H. J. Lu
Fri Aug 9 14:33:00 GMT 2002
On Fri, Aug 09, 2002 at 11:05:53PM +0200, Franz Sirl wrote:
> On Freitag, 9. August 2002 22:43, H. J. Lu wrote:
> > On Fri, Aug 09, 2002 at 09:42:18PM +0200, Franz Sirl wrote:
> > > It should warn because for everything except the very special libgcc_s
> > > vs. glibc case the user is warned about a real problem. In the normal
> > > case if a symbol is moved, you simply reversion it and want to be warned
> > > if you forget that.
> > >
> > > Contrary to your patch, I would rather strengthen the warning, cause it
> > > really should warn too if both symbols are default non-weak symbols with
> > > the same version, not warning about that caused the libgcc_s vs. glibc
> > > mess in the first place.
> > There is nothing wrong to have 2 different DSOes defining the same
> > symbol. We never warn about it nor should.
> Really? This sounds very suspicious to me. IMO we should warn unless:
> - both symbols have same non-default versions
> - or one of them is weak
Forget about weak. Weak in a DSO should be treated as strong.
> And we _did_ warn about this situation until you disabled it, just the warning
> didn't cover enough situations.
> Remember, it's a warning during linking, no error, so if someone want's to
> ignore it he is free to do so (and the shared linker rightly doesn't warn,
> cause it can assume the situation is OK, the user has been warned before),
> but it's good to have the warning in the first place.
As I said, ld never warns a definition in DSO being overriden by
another definition. A versioned definition is just another a
definition. I can give you plenty examples with and without symbol
versioning where many thing can go wrong if you aren't careful. It
is not the ld's job to complain about them.
More information about the Binutils