That is also possible with objcopy, but both versions of the trick require GNU binutils. I have not found an equally clean way to do it on the OSX/IOS when using the Xcode/LLVM toolstack. Incbin works but has its own problems.
-
-
-
This (dependence on GNU binutils) is primarily why I still avoid this and use a more portable xxd work flow
- 7 more replies
New conversation -
-
-
iirc
@endrazine's Witchcraft Compiler Collection abused these kind of tricks up to crazy levels
https://github.com/endrazine/wcc -
Glad you like it

- 2 more replies
New conversation -
-
-
-
For C (and hopefully C++ too), there is also progress on a simpler, preprocessor-based version that still has all the benefits of compile-time I/O without the memory barrier of using the linker and needing aggressive LTO to fold things:https://thephd.github.io/vendor/future_cxx/papers/source/C%20-%20embed …
- 1 more reply
New conversation -
-
-
This is how I embed a .zip in my hiring CTF challenge
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Alternative way - https://github.com/google/honggfuzz/blob/075756bea8d1f08eb19d5de18e48d264038b853c/hfuzz_cc/hfuzz-cc.c#L28 … - it's even reasonably portable
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
You can create links against blobs in JavaScript too:https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL …
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Blaze's cc_embed_data() uses objcopy for the same purpose. Been meaning to implement it that way for
#SandboxedAPI for a while.Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.