[all-commits] [llvm/llvm-project] c997fe: [llvm-objcopy] --compress-debug-sections: remove t...

Fangrui Song via All-commits all-commits at lists.llvm.org
Thu Sep 22 10:27:04 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c997fe658655b42237f556c11c7f5bc8ec60658b
      https://github.com/llvm/llvm-project/commit/c997fe658655b42237f556c11c7f5bc8ec60658b
  Author: Fangrui Song <i at maskray.me>
  Date:   2022-09-22 (Thu, 22 Sep 2022)

  Changed paths:
    M llvm/lib/ObjCopy/ELF/ELFObjcopy.cpp
    M llvm/lib/ObjCopy/ELF/ELFObject.cpp
    M llvm/lib/ObjCopy/ELF/ELFObject.h
    M llvm/test/tools/llvm-objcopy/ELF/Inputs/compress-debug-sections.yaml
    M llvm/test/tools/llvm-objcopy/ELF/compress-debug-sections-zstd.test

  Log Message:
  -----------
  [llvm-objcopy] --compress-debug-sections: remove tail padding for ELFCLASS32

For an ELFCLASS32 object, a compressed section due to --compress-debug-sections={zlib,zstd} has a
tail padding of 12 zero bytes. zlib happily allows this while zstd is rigid and
reports `error: '{{.*}}': failed to decompress section '.debug_foo': Src size is incorrect`.

Cole Kissane reported the problem.

Reviewed By: jhenderson, phosek

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




More information about the All-commits mailing list