Fix the characteristics of some sections like ".voltbl". Or the program will be crash sometimes.
This would need a test case for it to be commitable.
I don’t want the linker to blindly change the characteristics bits for any section that have the bits set to zero - if this is needed for a specific section in some case, then please limit the workaround to exactly that section name and nothing else. It would be good to give more context about what tool that produces such faulty sections, and ideally that tool would be fixed too. If possible, it could be good to limit the workaround to mingw mode, if that’s where this occurs.
Also, when uploading diffs, please create the diffs with extra context (git diff -U999).
I think the linker is supposed to treat these as metadata sections, similar to .gfids, which do not appear in the output. See this old issue:
The MSVC CRT includes objects with some of these sections, and the MSVC linker does not include these sections in the output, or if it does, it has builtin rules to merge them into existing sections like .rdata.
I think a better fix would be to discard both of these sections (.00cfg and .voltbl) until we understand what they are for.
.00cfg is for "Control Flow Guard", there's a pretty good explanation in the answers:  (and if you follow the links as well)
.voltbl is for "Volatile Metadata" for x86 emulation on ARM64, see . Also thread in , and  and .