RE: Embedding stuff in ELF section of compiled module

Maxime Devos via General Guile related discussions <[email protected]>
Newsgroups gmane.lisp.guile.user
Message-ID <[email protected]>
>TLDR; Is there a way to embed a bytevector into a ELF section of a
compiled module (.go)?

Yes, all (referenced) bytevectors end up somewhere. But going by the rest, it needs to be in some section in particular.

>So, is there any way for adding section to the compiled ELF, something
along like:
> (embed-bytevector ".my_section"
         #vu8(bytes ...))

Except perhaps for external tools (like 'objcopy’ mentioned elsewhere), not yet. At least, I think I would remember reading about such a mechanism.

So, answer is yes: the way to do this is too add support to Guile for this.

That said, are you sure it’s a separate section you want? Perhaps an entry in the (ELF) symbol table would do as well (and these are already populated, though I don’t recall to what extent).

Best regards,
Maxime Devos
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.