[PATCH] D90108: [MC] Error for .weak/.globl/.local which change the symbol binding

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 27 01:50:31 PDT 2020


psmith added a comment.

> If we issue a warning instead, users will only notice the semantic difference when they use `-Wa,--fatal-warnings`. We can classify the potential risks on whether .local is used:
>
> - .local is used: .local is a very rare directive.
> - .local is not used: the issue is about .weak and .globl . This represents a semantic difference between MC and GNU ld. There may be a few more but I doubt there can be more than a few. Can we try error first and switch to a warning if it turns out to be a problem?

I don't object to go for an error; I do tend to be a bit nervous about making something an error that has been accepted for many years as contrary to my expectations that something is rare, there is almost always someone that has a special case and is greatly inconvenienced by it. If we are lucky very few people will be affected and they can change their code, if we are not then we may have to revisit.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90108/new/

https://reviews.llvm.org/D90108



More information about the llvm-commits mailing list