[PATCH] D64327: [ELF] Loose condition for relocation with a symbol

Nikola Prica via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 25 04:36:06 PDT 2019


NikolaPrica added a comment.

In D64327#1600792 <https://reviews.llvm.org/D64327#1600792>, @MaskRay wrote:

> Do you mean with the linker option `-O2`, i.e. the compiler driver option `-Wl,-O2`, gold can produce incorrect result? If that is the case, I don't think we should revert the patch. ld.bfd and gold default to `-O0` (lld defaults to `-O1`), it is extremely rare for a project to specify `-Wl,-O2`.


Yes. That is the case. With `-O1` it works. The thing is that this patch breaks `sanitizer-x86_64-linux` and `sanitizer-x86_64-linux-android` build bots. On these build bots default linker is gold and apparently it is using `-O2` which is causing failure.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D64327





More information about the llvm-commits mailing list