Sujet : Re: C23 thoughts and opinions
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.lang.cDate : 27. May 2024, 01:44:21
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v30l15$3mcj6$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12
User-Agent : Pan/0.158 (Avdiivka; )
On Sun, 26 May 2024 13:09:36 +0200, David Brown wrote:
People have always managed to embed
binary source files into their binary output files - using linker
tricks, or using xxd or other tools (common or specialised) to turn
binary files into initialisers for constant arrays (or structs).
Don’t call them “tricks”. Call them “linker scripts” and “build
procedures”. They can do some quite complex things.
#embed has two purposes. One is to save you from using external tools
for that kind of thing.
But it can only be a partial solution to that. It cannot replace the
procedures needed to construct the binary data format. It only solves the
easy part: including that binary data in the build. And only in a certain
way.
That’s why I think it’s a waste of time.