This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] Use LDPR_PREVAILING_DEF for symbols in -u


Using the gold plugin I noticed that symbols passed to -u were still reported as LDPR_PREVAILING_DEF_IRONLY. I believe the correct behaviour would be to return LDPR_PREVAILING_DEF. This is useful for example for letting the linker (and therefore the compiler) know of references that exist only in inline assembly.

2010-02-04 Rafael Ávila de Espíndola <respindola@mozilla.com>

	* plugin.cc (is_visible_from_outside): Return true for symbols
	in the -u option.

Cheers,
Rafael
diff --git a/gold/plugin.cc b/gold/plugin.cc
index 9c444c2..214eff3 100644
--- a/gold/plugin.cc
+++ b/gold/plugin.cc
@@ -699,6 +699,8 @@ is_visible_from_outside(Symbol* lsym)
     return true;
   if (parameters->options().relocatable())
     return true;
+  if (parameters->options().is_undefined(lsym->name()))
+    return true;
   if (parameters->options().export_dynamic() || parameters->options().shared())
     return lsym->is_externally_visible();
   return false;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]