Automatic date update in version.in
[binutils-gdb.git] / ld / plugin.c
index 6db52d168024956b16bc07413a17ab6892ad40bf..fe2031046775d40dbff25c6870348216c414e44f 100644 (file)
@@ -863,8 +863,11 @@ get_symbols (const void *handle, int nsyms, struct ld_plugin_symbol *syms,
          /* We need to know if the sym is referenced from non-IR files.  Or
             even potentially-referenced, perhaps in a future final link if
             this is a partial one, perhaps dynamically at load-time if the
-            symbol is externally visible.  Also check for wrapper symbol.  */
-         if (blhe->non_ir_ref_regular || wrap_status == wrapper)
+            symbol is externally visible.  Also check for __real_SYM
+            reference and wrapper symbol.  */
+         if (blhe->non_ir_ref_regular
+             || blhe->ref_real
+             || wrap_status == wrapper)
            res = LDPR_PREVAILING_DEF;
          else if (wrap_status == wrapped)
            res = LDPR_RESOLVED_IR;