[PATCH] D21781: [ELF] Warn for duplicate symbols in version scripts instead of erroring out

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 28 13:50:38 PDT 2016


> I share your feelings, Rafael, at least partly. I always try to err on
> the side of safety (which in this case would mean emitting an error).
> In this case tho, I'm not entirely sure it's an option. I may miss
> something, so, here's my question: how do you plan to deal with
> downstream consumers? I agree people abused of this feature because in
> the past there was no error handling/checking. But this is the world
> we (have to) live in, and it's (IMHO) not entirely reasonable asking
> people to change their version scripts which before worked just fine.


Depends how common that abuse is. If we have a compelling reason for
them to use lld and the fix is simple, I think we should try fixing
downstream. So far it was just openoffice, right?

> With all the coverage we can get, there's gonna still be a lot of
> people we'll never know of which will be sad because their code won't
> link, and they'll either complain or switch back to something else.
> So, after my $0.02, the best I'm able to propose is introducing a knob
> (e.g. --allows-multiple-in-version-script, or maybe something less
> verbose), defaulted to true to preserve compatibility with
> ld.{bfd,gold}, and *eventually* try to switch that on by default.
>
> Hope this makes sense to you. If not, happy to hear what's your plan =)

It depends on how many cases there are. If it is really just open
office we fix it change lld back. If there are a few more important
cases, we add a flag, but default it to producing an error.

Note that we don't intend to support every bug (or even feature) of
bfd/gold, so there may always be some package that needs bfd.

Cheers,
Rafael


More information about the llvm-commits mailing list