Introduce and use a new section type for the bb_addr_map section.
authorRahman Lavaee <rahmanl@google.com>
Thu, 8 Oct 2020 18:12:40 +0000 (11:12 -0700)
committerRahman Lavaee <rahmanl@google.com>
Thu, 8 Oct 2020 18:13:19 +0000 (11:13 -0700)
commit2b0c5d76a604c8d8b468e1ab6c36f3f495c80127
treeb34f6f7ad519a2adf66817defe51a4b2af9d3633
parent8f0658ae67da6a115daac5587cca42b2f47a2f6f
Introduce and use a new section type for the bb_addr_map section.

This patch lets the bb_addr_map (renamed to __llvm_bb_addr_map) section use a special section type (SHT_LLVM_BB_ADDR_MAP) instead of SHT_PROGBITS. This would help parsers, dumpers and other tools to use the sh_type ELF field to identify this section rather than relying on string comparison on the section name.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D88199
llvm/docs/Extensions.rst
llvm/include/llvm/BinaryFormat/ELF.h
llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/lib/CodeGen/BasicBlockSections.cpp
llvm/lib/MC/MCObjectFileInfo.cpp
llvm/lib/MC/MCParser/ELFAsmParser.cpp
llvm/lib/MC/MCSectionELF.cpp
llvm/lib/Object/ELF.cpp
llvm/test/CodeGen/X86/basic-block-sections-labels-functions-sections.ll
llvm/test/CodeGen/X86/basic-block-sections-labels.ll
llvm/test/MC/AsmParser/llvm_section_types.s [new file with mode: 0644]