diff options
author | Fangrui Song <i@maskray.me> | 2022-03-11 13:32:24 -0800 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2022-03-11 13:32:24 -0800 |
commit | a7ac200fd0c509ca89a294c5f08e456a081ceac0 (patch) | |
tree | ed52aa6ccd998d8e34ae24eccb8480f711451c8d /llvm/lib/MC/ELFObjectWriter.cpp | |
parent | 94bda3aaa12192660cd8da3a7b3bf9749b2a2c44 (diff) | |
download | llvm-a7ac200fd0c509ca89a294c5f08e456a081ceac0.zip llvm-a7ac200fd0c509ca89a294c5f08e456a081ceac0.tar.gz llvm-a7ac200fd0c509ca89a294c5f08e456a081ceac0.tar.bz2 |
[MC] Remove unneeded zlib opt-out for .debug_frame
The opt-out from rL236267 (2015) is untested and seems no longer needed (or not
needed when rL236267 was committed): there is nothing special with uncompressed
alignment. This brings us in line with GCC which compresses .debug_frame .
Checked that -g -fno-asynchronous-unwind-tables + objcopy
--decompress-debug-sections output is identical to -g
-fno-asynchronous-unwind-tables -gz + objcopy --decompress-debug-sections
output.
Diffstat (limited to 'llvm/lib/MC/ELFObjectWriter.cpp')
-rw-r--r-- | llvm/lib/MC/ELFObjectWriter.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/llvm/lib/MC/ELFObjectWriter.cpp b/llvm/lib/MC/ELFObjectWriter.cpp index 5b137e4..abcd3bb 100644 --- a/llvm/lib/MC/ELFObjectWriter.cpp +++ b/llvm/lib/MC/ELFObjectWriter.cpp @@ -848,13 +848,9 @@ void ELFWriter::writeSectionData(const MCAssembler &Asm, MCSection &Sec, auto &MC = Asm.getContext(); const auto &MAI = MC.getAsmInfo(); - // Compressing debug_frame requires handling alignment fragments which is - // more work (possibly generalizing MCAssembler.cpp:writeFragment to allow - // for writing to arbitrary buffers) for little benefit. bool CompressionEnabled = MAI->compressDebugSections() != DebugCompressionType::None; - if (!CompressionEnabled || !SectionName.startswith(".debug_") || - SectionName == ".debug_frame") { + if (!CompressionEnabled || !SectionName.startswith(".debug_")) { Asm.writeSectionData(W.OS, &Section, Layout); return; } |