[PATCH] D84846: [MC] Add support for generating missing GNU build notes

Timm Bäder via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 29 07:09:19 PDT 2020


tbaeder created this revision.
Herald added subscribers: llvm-commits, cfe-commits, dang, hiraditya, emaste.
Herald added a reviewer: espindola.
Herald added projects: clang, LLVM.
tbaeder requested review of this revision.
Herald added a subscriber: MaskRay.

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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D84846

Files:
  clang/include/clang/Basic/CodeGenOptions.def
  clang/include/clang/Driver/Options.td
  clang/lib/CodeGen/BackendUtil.cpp
  clang/lib/Driver/ToolChains/Clang.cpp
  clang/lib/Frontend/CompilerInvocation.cpp
  clang/tools/driver/cc1as_main.cpp
  llvm/include/llvm/MC/MCContext.h
  llvm/include/llvm/MC/MCTargetOptions.h
  llvm/lib/CodeGen/LLVMTargetMachine.cpp
  llvm/lib/MC/ELFObjectWriter.cpp
  llvm/lib/MC/MCContext.cpp
  llvm/lib/MC/MCTargetOptions.cpp
  llvm/test/MC/ELF/build-notes.s
  llvm/tools/llvm-mc/llvm-mc.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84846.281561.patch
Type: text/x-patch
Size: 19673 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200729/7b3ce181/attachment-0001.bin>


More information about the cfe-commits mailing list