[PATCH] D71639: [ELF][PPC64] Improve "call lacks nop" diagnostic and make it compatible with GCC<5.5 and GCC<6.4

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 2 12:42:17 PST 2020


MaskRay added a comment.

In D71639#1801733 <https://reviews.llvm.org/D71639#1801733>, @sfertile wrote:

> Relaxing the check will allow those old miss-compiled objects to link, but we are loosing some utility here as well: we are turning a valid link time failure into a potential runtime failure. Even worse a runtime failure that depends on the environment at load time so the failure is not consistent. Could we guard the error relaxation with a specific option so that 1) It must be opted into specifically and 2) We can eventually phase the option out once the OS that used gcc 5.* and 6.* go out of service?


I think gold does a very similar thing here. Now the question is whether we consider this diagnostic helpful...

Let me contribute one data point: It seems that now this error only flags hand-written assembly that does not have `nop` after `bl`. I have tested in our internal code base. There were many link failures due to precompiled libstdc++/Fortran LAPACK object files. With this fix, there is no link failure.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71639





More information about the llvm-commits mailing list