>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