News for hackers. Stuff that matters.
Re:Embedding files in C programs with koio by jschwartzi on Wednesday May 30, 2018 @06:06PM (#17192314)
If you don't have a userspace or a filesystem, you can't memory map anything from it. In that case, your binary needs to contain all of the assets it needs to run such as images.

I've needed to do this to embed images in an application written on bare metal before. objcopy and its ilk do turn the data into a byte array that has a symbol in the symbol table. You then reference that symbol in your code. Generally you're not embedding this stuff in an ELF in that case.

There are no comments on this comment yet.