News for hackers. Stuff that matters.
Re:Embedding Binary Objects in C by tyingq on Thursday April 16, 2020 @08:11AM (#22888568)
There's also gnu's objcopy.

This post covers a lot of different approaches, and has lots of tips: https://www.devever.net/~hl/incbin

Re:Embedding Binary Objects in C by regularfry on Thursday April 16, 2020 @12:55PM (#22891290)
I got about 90% of the way to having a working ruby single-file executable builder which used objcopy to embed a sqlite database of the source files into an MRI build. Then YARV happened and the ruby build chain changed just enough that I needed to throw it out and start again.

Every now and again I ponder having another go with mruby...

Re:Embedding Binary Objects in C by rkeene2 on Thursday April 16, 2020 @02:34PM (#22892149)
FWIW, this is roughly how Tclkits work in the Tcl world. Although by default they use a Metakit database instead of SQLite.

Currently they append the database to the end of the executable, which has some problems and I'm working to make including it in the image more standardized as part of XVFS [0].

[0] https://chiselapp.com/user/rkeene/repository/xvfs/

Re:Embedding Binary Objects in C by tyhoff on Thursday April 16, 2020 @11:24AM (#22890342)
Thanks for the link! That’s got a lot of goodies.

One of us from Memfault also wrote a post about tips with Binutils, and this approach is covered in it.

https://interrupt.memfault.com/blog/gnu-binutils#objcopy

Re:Embedding Binary Objects in C by saagarjha on Thursday April 16, 2020 @01:44PM (#22891743)
TIL objdump --visualize-jumps…
Re:Embedding Binary Objects in C by fao_ on Thursday April 16, 2020 @10:51AM (#22889937)
The image background on that webpage is extremely distracting
Re:Embedding Binary Objects in C by tyingq on Thursday April 16, 2020 @11:56AM (#22890676)
Make your browser width narrow, and it drops to the bottom. Not that you should have to :)
Re:Embedding Binary Objects in C by asdfqwerty18 on Thursday April 16, 2020 @08:17AM (#22888594)
thanks