<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Oct 9, 2015 at 9:13 AM, Rafael EspĂ­ndola <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="">On 8 October 2015 at 19:08, Rui Ueyama <<a href="mailto:ruiu@google.com">ruiu@google.com</a>> wrote:<br>
> You are using SymbolTable's hash table both for dedup'ing SHT_GROUP sections<br>
> and store symbols, but seems like the two uses don't overlap in your code.<br>
> SHT_GROUP sections only cares if the LSB bit is set in the pointer, and<br>
> symbols only care about pointers stored at MSBs. Is this different from<br>
> having a separate hash table for SHT_GROUP sections?<br>
<br>
</span>We can have two tables. Most, but not all, group symbols are also<br>
regular symbols. For example, given<br>
<br>
inline void foo() {}<br>
<br>
clang produces a _Z3foov symbol and puts the section in a comdat with<br>
at signature of _Z3foov.<br>
<br>
So having one table is potentially just an optimization.<br></blockquote><div><br></div><div>How can it be a performance optimization?</div><div><br></div><div>Say we have _Z3foov symbol but have never seen _Z3foov group. We are reading an object file that contains a group whose name is _Z3foov. Then your code will just read that group regardless of the presence of the symbol having the same name, no?</div><div><br></div></div></div></div>