4 ms·
> Come on. Both binutils and nasm can generate perfectly working PE object files. I don't know the answer off the top of my head, but I bet anything even pure M
by wtetzner 3y ago
> Come on. Both binutils and nasm can generate perfectly working PE object files. I don't know the answer off the top of my head, but I bet anything even pure MSVC has a simple answer here.
Right, meaning you have to implement N solutions instead of just one. It's a common enough and useful enough feature for the language to support it. I think it would be a different story if linkers were covered by the language specification.
- ajross 3y agoI remain shocked at how controversial this is. Yes. Yes, implementing N trivial and easily maintained solutions is clearly better than one portable hack.
- wtetzner 3y agoClearly many people disagree. And given that C now has #embed, I don't even think I'd consider it to be a hack. > I remain shocked at how controversial this is. I am a bit shocked that you think the right solution to making data statically available to the rest of your program is somehow outside the scope of the programming language.
- ajross 3y agoThe comparison wasn't to #embed[1], but to an 8MB static array. You're winning an argument against a strawman, not me. For the record, I think #embed (given tooling that supports it) would be an excellent choice! That's not a defense of the technique under discussion though. [1] Which FWIW is much less portable as an issue of practical engineering than assembler or binutils tooling!