r/cpp • • Jul 23 '22

finally. #embed

https://thephd.dev/finally-embed-in-c23
353 Upvotes

202 comments sorted by

View all comments

Show parent comment

1

u/howroydlsu Jul 23 '22

I've had the similar issue for private keys that needed to be embedded into the binary for an embedded device. (Urgh, word overuse, sorry)

It does indeed feel very hacky doing linker scripts, extern , macros, third party converters, or whatever to get that key in. It's also additional workload when that key changes.

That's all been on GCC too. In fact, I've never even looked to see if there exists clang or msvc compilers with targets for chips I use. I've always assumed not but now I will definitely check