3 ms·
> Quick note: The situation is not different on Linux, MacOS, or other operating systems because all executable formats have some way to embed images. What publ
by Sukera 9y ago
> Quick note: The situation is not different on Linux, MacOS, or other operating systems because all executable formats have some way to embed images. What publishers should do is remove unncessary metadata before publishing, which is easy to do in the case of the PNG because we can simply omit the iTXt chunk.
From your link - so I guess the situation on linux isn't different? Or am I missing something, other than that it depends on the embedded PNG?
- PaulHoule 9y agoI don't expect it to be different on Linux or any other operating system.
- jwilk 9y agoI'm not quite sure what exactly the author's point is. Yes, you could embed images in ELFs, too, if you really wanted, but why? There's no standardized way to do it, and putting the images in separate files is easier.
- jzwinck 9y agoThere is a standard way to embed any file into an ELF. The program "objcopy" creates object files from arbitrary input files. You then simply link the objects into your executable. The program can then access those arbitrary embedded data chunks by their symbol names, just as if they were literal strings in the source code. I explain how to do this in the context of embedding a version file here: https://stackoverflow.com/questions/16349557/does-gcc-have-any-options-to-add-version-info-in-elf-binary-file https://stackoverflow.com/questions/16349557/does-gcc-have-a...
- kalleboo 9y agoIf we're comparing platforms, Xcode (Apple's IDE for iOS/macOS apps) runs pngcrush on all PNG assets by default.