[all-commits] [llvm/llvm-project] d6704e: [llvm-objcopy][MachO] Ignore all LC_SUB_* commands.

Daniel Rodríguez Troitiño via All-commits all-commits at lists.llvm.org
Wed Jul 28 17:36:43 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d6704e5ed91478464e551ee9d5520584978553ee
      https://github.com/llvm/llvm-project/commit/d6704e5ed91478464e551ee9d5520584978553ee
  Author: Daniel Rodríguez Troitiño <danielrodriguez at fb.com>
  Date:   2021-07-28 (Wed, 28 Jul 2021)

  Changed paths:
    M llvm/lib/ObjectYAML/MachOEmitter.cpp
    M llvm/lib/ObjectYAML/MachOYAML.cpp
    A llvm/test/tools/llvm-objcopy/MachO/sub-load-commands.test
    M llvm/tools/llvm-objcopy/MachO/MachOLayoutBuilder.cpp

  Log Message:
  -----------
  [llvm-objcopy][MachO] Ignore all LC_SUB_* commands.

The LC_SUB_FRAMEWORK, LC_SUB_UMBRELLA, LC_SUB_CLIENT, and LC_SUB_LIBRARY
are used to indicate related libraries, binaries or framework names.
Their only payload is the string with the name of the object. Adding
those commands to the list of ignored/skipped load commands will avoid
an error that stop the process of copying/stripping and will copy their
contents verbatim.

Additionally, in order to have a test for this case, `yaml2obj` now
allows those four commands to contain a `Content`.

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




More information about the All-commits mailing list