[PATCH] D41113: [LLVMgold] Don't set resolutions for undefined symbols to 'Prevailing'

Eugene Leviant via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 12 07:39:47 PST 2017


evgeny777 created this revision.
evgeny777 added reviewers: rafael, tejohnson, mehdi_amini.

https://reviews.llvm.org/D40970 actually breaks one of the gold plugin test cases, because gold plugin marks resolution of asm undefined symbol as prevailing. 
This patch fixes it (according to gold sources LDPR_PREVAILING_DEF_IRONLY is not set for symbol when it is referenced from outside of the module)


https://reviews.llvm.org/D41113

Files:
  tools/gold/gold-plugin.cpp


Index: tools/gold/gold-plugin.cpp
===================================================================
--- tools/gold/gold-plugin.cpp
+++ tools/gold/gold-plugin.cpp
@@ -656,7 +656,7 @@
       break;
 
     case LDPR_PREVAILING_DEF_IRONLY:
-      R.Prevailing = true;
+      R.Prevailing = (Sym.def != LDPK_UNDEF);
       break;
 
     case LDPR_PREVAILING_DEF:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41113.126547.patch
Type: text/x-patch
Size: 360 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171212/d6fc8a3e/attachment.bin>


More information about the llvm-commits mailing list