<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Tue, Aug 28, 2018 at 6:07 AM Pavel Labath <<a href="mailto:pavel@labath.sk">pavel@labath.sk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 28/08/18 02:08, David Blaikie wrote:<br>
> Any idea if there's work to add str_index support to the name tables?<br>
> <br>
> I guess the idea is that it's more efficient to have one fewer<br>
> indirections for strings, and worth the cost in duplicate<br>
> relocations/bytes/etc? *shrug*<br>
<br>
Interesting question. I am not aware of anyone looking at this. I<br>
suppose that would trade a bit of performance for a bit of size (but<br>
only for the intermediate .o file and only when using split-dwarf),<br>
though I can't estimate how big would those "bits" be.<br></blockquote><div><br></div><div>Hmm - why only when using split-dwarf? I'd have thought the opposite - when not using split-dwarf the strings will be indexed but debug_names won't use that index, instead using its own. So in that case you'd get duplicate indexes, basically. When using split-dwarf it'd be probably unhelpful - just trading one index for another/adding that extra layer of indirection. (because the only reason the strings are in the index is for the debug_names in the split-DWARF situation).</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
>     +; Produced with "clang -S -emit-llvm -gdwarf-5" from source "int<br>
>     X;", copied<br>
>     +; three times and modified by hand.<br>
> <br>
> <br>
> Could you describe in the comment what modifications were necessary?<br>
<br>
The modifications consisted of tweaking the variable names (DW_AT_name)<br>
and the compilation directory (DW_AT_comp_dir) to trigger the inserting<br>
of strings in different order.<br>
<br>
I'll update the comment to reflect that.<br>
<br>
pl<br>
</blockquote></div></div>