[llvm-dev] ELF string table access in backend

David Blaikie via llvm-dev llvm-dev at lists.llvm.org
Tue Nov 26 18:08:16 PST 2019


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)

On Tue, Nov 26, 2019 at 9:17 AM Dmitri Botcharnikov via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> Hello,
>
> 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.
>
> For this I have two questions:
>
> - How can I get a section index in the section table from within target
> ELF streamer? Is it possible?
>
> - How can I get access to the string table section, put some string and
> get back its offset in string table?
>
> If it is not possible maybe there is a way to somehow post-process ELF for
> this before actually writing to file?
>
>
>
> Best regards,
>
> Dmitri Botcharnikov
>
>
>
>
>
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20191126/61ce5f40/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: noname
Type: image/gif
Size: 13168 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20191126/61ce5f40/attachment.gif>


More information about the llvm-dev mailing list