<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Nov 29, 2016 at 9:44 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:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><span class="gmail-">Peter Collingbourne <<a href="mailto:peter@pcc.me.uk">peter@pcc.me.uk</a>> writes:<br>
<br>
> pcc added inline comments.<br>
><br>
><br>
> ================<br>
> Comment at: llvm/lib/Object/<wbr>ModuleSymbolTable.cpp:166<br>
> +    if (isa<Function>(GO) && !GO->hasSection())<br>
> +      Res |= BasicSymbolRef::SF_Text;<br>
>    if (GV->hasPrivateLinkage())<br>
> ----------------<br>
> mehdi_amini wrote:<br>
>> Why the test on the presence of a section? Do we have a test that exercise this?<br>
> It's a rough approximation for "is this function in the .text section or not". I don't think there's a test, I'll add one.<br>
<br>
</span>But at least for nm we want to print 't' for a function in another<br>
section, no?<br></blockquote><div><br></div><div>Yes, I was basing this logic on the nm man page which says "The symbol is in the text (code) section.", but it looks like that is wrong and nm is testing the executable bit on the section instead. I'll remove the hasSection part.</div><div><br></div><div>Maybe the flag should be named SF_Executable then?</div><div><br></div><div>Thanks,</div></div>-- <br><div class="gmail_signature"><div dir="ltr">-- <div>Peter</div></div></div>
</div></div>