D100944 broke the ability to specify custom section flags in LLVM IR by including an empty section with the desired flags in module asm. This functionality is used by rustc to embed LTO bitcode with the SHF_EXCLUDE flag, and currently blocks our evaluation of the LLVM 13 release. As the post-commit discussion on D100944 indicates, other people were using this functionality as well: https://reviews.llvm.org/D100944#2840948
This reverts D100944 to restore the ability to set section flags. The change from D100944 can be reapplied once LLVM provides an alternative way to specify section flags -- it would certainly be better if it were possible to do this using a dedicated IR construct. But I don't think it's possible to add such a construct for the LLVM 13 release anymore, so this reverts to the status quo.