[DEBUGINFO] Add flag for DWARF2 or less to use sections as references.
authorAlexey Bataev <a.bataev@hotmail.com>
Wed, 28 Feb 2018 15:02:59 +0000 (15:02 +0000)
committerAlexey Bataev <a.bataev@hotmail.com>
Wed, 28 Feb 2018 15:02:59 +0000 (15:02 +0000)
commit9de940b93bdbb0cf032b8337c5390630ba5e1acd
tree8d1b1b2e490b59d6f17b380ac3b0d14f89e6491e
parenta1a29336340080d33893f82d5bf369df11615d58
[DEBUGINFO] Add flag for DWARF2 or less to use sections as references.

Summary:
Some targets does not support labels inside debug sections, but support
references in form `section +|- offset`. Patch adds initial support
for this. Also, this patch disables emission of all additional debug
  sections that may have labels inside of it (like pub sections and
  string tables).

Reviewers: probinson, echristo

Subscribers: JDevlieghere, llvm-commits

Differential Revision: https://reviews.llvm.org/D43627

llvm-svn: 326328
llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
llvm/test/DebugInfo/X86/sections_as_references.ll [new file with mode: 0644]