Embedding stuff in ELF section of compiled module

Olivier Dion <[email protected]>
Newsgroups gmane.lisp.guile.user
Organization EfficiOS
Message-ID <8734k0tp4x.fsf@laura>
Hi,

TLDR; Is there a way to embed a bytevector into a ELF section of a
compiled module (.go)?

I have a case where I want to generate bytevectors that follow an ABI
for event description of static tracepoints.  I would like this
bytevector to be put into a know ELF section of the compiled module so
that external tools can reference it by parsing the ELF file,
i.e. without running Guile.  I personnaly don't care about none-ELF
systems, so I'm fine if this solution is Linux only.

I guess this is similar to embedding something else like an audio/image
for a video game.

So, is there any way for adding section to the compiled ELF, something
along like:

 (embed-bytevector ".my_section"
         #vu8(bytes ...))

If not, I wonder if this is something that could be appreciated for
other users as well?

Thanks,
Olivier

-- 
Olivier Dion
EfficiOS Inc.
https://www.efficios.com
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.