Page MenuHomePhabricator

[MC] Add support for generating missing GNU build notes
Needs ReviewPublic

Authored by tbaeder on Jul 29 2020, 7:09 AM.

Details

Summary

Add support for generating missing GNU build notes to the LLVM assembler.

This makes clang accept and pass through -Wa,--generate-missing-build-notes=[yes/no]. If =yes is passed (the default is no), then the assembler will check whether a .gnu.build.attributes section is present. If not, it will generate one for all relevant code sections.

This is the equivalent to what the GNU assembler gas is already doing in maybe_generate_build_notes() in gas/write.c: https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=gas/write.c;h=0b43063bbaab76d21fe3bac5fb4643bfff3c72e2;hb=HEAD#l1954

Diff Detail

Event Timeline

tbaeder created this revision.Jul 29 2020, 7:09 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald Transcript
tbaeder requested review of this revision.Jul 29 2020, 7:09 AM
tbaeder updated this revision to Diff 284308.Aug 10 2020, 3:48 AM

Add a test that checks that clang accepts -Wa,--generate-missing-build-notes=yes and -Wa,--generate-missing-build-notes=no