<div dir="ltr">BTW, OK to submit this change?</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 27, 2017 at 12:26 PM, Rafael Avila de Espindola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">> In that way, you can mark a symbol as having a significant address only<br>
> when the symbol is local to a TU, no? If a symbol is global, other TU may<br>
> use its address, so you need to assume conservatively that all globals<br>
> addresses are significant.<br>
<br>
</span>Not necessarily. For example, a c++ virtual function is never used<br>
directly from user code, so there is a language guarantee that allows<br>
unnamed_addr to be added.<br>
<span class=""><br>
> I'd think that address taken/not-taken is more like an attribute of each<br>
> reocation, rather than symbol or section. Currently, relocations to take<br>
> addresses are all the same, so linkers cannot know their intentions<br>
> (whether it is used as a pointer or not). If we introduce a new set of<br>
> relocations to convey that information, we can fix this.<br>
<br>
</span>But that can be a 2x on the number of relocations. With a symbol flag we<br>
only need one flag.<br>
<br>
Cheers,<br>
Rafael<br>
</blockquote></div><br></div>