[ELF] --gc-sections: allow GC on reserved sections in a group
This generalizes D70146 (SHT_NOTE) to more reserved sections and makes our rules more consistent. Now SHF_GROUP is more similar to SHF_LINK_ORDER. For SHT_INIT_ARRAY/SHT_FINI_ARRAY, the rule will be closer to PE/COFF link.exe. Previously sanitizers use llvm.global_ctors to make module_ctor a GC root, which is considered an abuse. https://groups.google.com/g/generic-abi/c/TpleUEkNoQI We can squeak through on compatibility issues because compilers otherwise don't use SHF_GROUP special sections.
Loading
Please sign in to comment