DebugInfo: Support for compressed debug info sections
authorDavid Blaikie <dblaikie@gmail.com>
Thu, 27 Mar 2014 20:45:58 +0000 (20:45 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Thu, 27 Mar 2014 20:45:58 +0000 (20:45 +0000)
commit7400a979521a70be4d69071271e4543014fbfcf5
tree8ec8ed8cb7e1915b48136bb97b292a0ed8f45efe
parent70bd1fd22f801fab4b01d7e0dd22d6fb927c8fcf
DebugInfo: Support for compressed debug info sections

1) When creating a .debug_* section and instead create a .zdebug_
   section.
2) When creating a fragment in a .zdebug_* section, make it a compressed
   fragment.
3) When computing the size of a compressed section, compress the data
   and use the size of the compressed data.
4) Emit the compressed bytes.

Also, check that only if a section has a compressed fragment, then that
is the only fragment in the section.

Assert-fail if the fragment's data is modified after it is compressed.

Initial review on llvm-commits by Eric Christopher and Rafael Espindola.

llvm-svn: 204958
llvm/include/llvm/MC/MCAssembler.h
llvm/lib/MC/MCAsmInfo.cpp
llvm/lib/MC/MCAssembler.cpp
llvm/lib/MC/MCContext.cpp
llvm/lib/MC/MCObjectStreamer.cpp
llvm/test/MC/ELF/compression.s [new file with mode: 0644]
llvm/tools/llvm-mc/llvm-mc.cpp