<div dir="ltr">When you say "the string table" - are you referring to a particular section? There can be multiple/any section that contains strings that can be deduplicated by the linker (see debug_str for example) - and you can create your own sections that have that kind of functionality if you like (again, debug_str might be a goode xample to look at)</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Nov 26, 2019 at 9:17 AM Dmitri Botcharnikov via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="EN-US"><div class="gmail-m_-848084837941684508WordSection1"><p class="MsoNormal">Hello,<u></u><u></u></p><p class="MsoNormal">While developing a backend for the custom target I need to create a custom ELF section and put there some mapping of other ELF sections to strings.<u></u><u></u></p><p class="MsoNormal">For this I have two questions:<u></u><u></u></p><p class="MsoNormal">- How can I get a section index in the section table from within target ELF streamer? Is it possible? <u></u><u></u></p><p class="MsoNormal">- How can I get access to the string table section, put some string and get back its offset in string table?<u></u><u></u></p><p class="MsoNormal">If it is not possible maybe there is a way to somehow post-process ELF for this before actually writing to file?<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><span style="color:rgb(31,73,125)">Best regards,<u></u><u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125)">Dmitri Botcharnikov</span><span style="color:rgb(31,73,125)"><u></u><u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125)"><u></u> <u></u></span></p><p class="MsoNormal"><u></u> <u></u></p></div><table id="gmail-m_-848084837941684508bannersignimg"><tbody><tr><td><p> </p>
</td></tr></tbody></table><table id="gmail-m_-848084837941684508confidentialsignimg"><tbody><tr><td><p> <img style="border: 0px solid currentcolor; width: 520px; height: 144px; display: inline-block;" src="cid:16eaa9d0c8dc204bfcc1"> </p>
</td></tr></tbody></table></div><img src="http://ext.w1.samsung.net/mail/ext/v1/external/status/update?userid=dmitry.b&do=bWFpbElEPTIwMTkxMTI2MTQxNzIyZXVjYXMxcDEzMjVlY2Q3YjE5YTQ5NjVkOTY4M2E5YmQ0MmNmYjc4YyZyZWNpcGllbnRBZGRyZXNzPWxsdm0tZGV2QGxpc3RzLmxsdm0ub3Jn" border="0" width="0" height="0" style="display: none;">_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>