[all-commits] [llvm/llvm-project] f147f5: [llvm-objcopy][MachO] Skip sections with zero offset

Alexander Shaposhnikov via All-commits all-commits at lists.llvm.org
Fri Nov 6 13:30:07 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: f147f59cd377a6be68e5ca5c343eb11df8e7ee6f
      https://github.com/llvm/llvm-project/commit/f147f59cd377a6be68e5ca5c343eb11df8e7ee6f
  Author: Alexander Shaposhnikov <alexshap at fb.com>
  Date:   2020-11-06 (Fri, 06 Nov 2020)

  Changed paths:
    A llvm/test/tools/llvm-objcopy/MachO/zero-offset-section.test
    M llvm/tools/llvm-objcopy/MachO/MachOLayoutBuilder.cpp
    M llvm/tools/llvm-objcopy/MachO/MachOReader.cpp
    M llvm/tools/llvm-objcopy/MachO/MachOWriter.cpp
    M llvm/tools/llvm-objcopy/MachO/Object.h

  Log Message:
  -----------
  [llvm-objcopy][MachO] Skip sections with zero offset

Some binaries can contain regular sections with zero offset and zero size.
This diff makes llvm-objcopy's handling of such sections consistent with
cctools's strip (which doesn't modify them),
previously the tool would allocate file space for them.

Test plan: make check-all

Differential revision: https://reviews.llvm.org/D90796




More information about the All-commits mailing list