[PATCH] D36280: Fix access to undefined weak symbols in pic code
Richard Smith - zygoloid via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 10 19:58:18 PDT 2017
rsmith added inline comments.
================
Comment at: lib/Target/X86/X86Subtarget.cpp:110-111
+ const GlobalValue *GV) {
+ if (!TM.shouldAssumeDSOLocal(M, GV))
+ return false;
+ // A weak reference can end up being 0. If the code can be more that 4g away
----------------
It seems to me that the bug is in `shouldAssumeDSOLocal`: we should not assume we can use a copy relocation for a variable that might not be defined.
https://reviews.llvm.org/D36280
More information about the llvm-commits
mailing list