* [patch] Use LDPR_PREVAILING_DEF for symbols in -u
@ 2011-02-04 21:21 Rafael Avila de Espindola
2011-02-04 21:38 ` Ian Lance Taylor
0 siblings, 1 reply; 2+ messages in thread
From: Rafael Avila de Espindola @ 2011-02-04 21:21 UTC (permalink / raw)
To: binutils; +Cc: iant, dnovillo
[-- Attachment #1: Type: text/plain, Size: 485 bytes --]
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
[-- Attachment #2: gold-plugin-u.patch --]
[-- Type: text/x-patch, Size: 471 bytes --]
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;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch] Use LDPR_PREVAILING_DEF for symbols in -u
2011-02-04 21:21 [patch] Use LDPR_PREVAILING_DEF for symbols in -u Rafael Avila de Espindola
@ 2011-02-04 21:38 ` Ian Lance Taylor
0 siblings, 0 replies; 2+ messages in thread
From: Ian Lance Taylor @ 2011-02-04 21:38 UTC (permalink / raw)
To: Rafael Avila de Espindola; +Cc: binutils, dnovillo
Rafael Avila de Espindola <respindola@mozilla.com> writes:
> 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.
This is OK.
Thanks.
Ian
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-02-04 21:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-04 21:21 [patch] Use LDPR_PREVAILING_DEF for symbols in -u Rafael Avila de Espindola
2011-02-04 21:38 ` Ian Lance Taylor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).