Enable the emission of a gnu attributes section by reusing the code for emitting the ARM build attributes section.
The gnu attributes follow the exact same section format as the ARM BuildAttributes section, so this can be factored out and reused for gnu attributes generally.
The immediate motivation for this is to emit a gnu attributes section for the vector abi on SystemZ (https://reviews.llvm.org/D105067).
clang-format: please reformat the code