[PATCH] D69146: [install-name-tool] Add first bits for install-name-tool

Alexander Shaposhnikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 17 15:34:26 PDT 2019


alexshap created this revision.
alexshap added reviewers: mtrent, smeenai, compnerd, jhenderson, jakehehrlich.
alexshap created this object with visibility "All Users".
Herald added subscribers: seiya, mgorny.
Herald added a reviewer: rupprecht.
Herald added a project: LLVM.

This diff adds a new "driver" for llvm-objcopy which is supposed to emulate the behavior of install-name-tool.
The main considerations are the following:

1. we save space in the toolchain distributions (llvm-install-name is a symbolic link to llvm-objcopy)
2. we avoid the limitations of the old tools (discussed on the mailing list, e.g. they were not able to rewrite the load commands if the new ones don't fit into the old buffer).
3. if necessary we can make use of many other features of llvm-objcopy and its design (e.g. support for archives out of the box) instead of replicating them.

The downsides: I have to mention that at the moment MachO's support in llvm-objcopy is still work-in-progress.

Test plan: make check-all


Repository:
  rL LLVM

https://reviews.llvm.org/D69146

Files:
  llvm/test/tools/llvm-objcopy/MachO/Inputs/i386.yaml
  llvm/test/tools/llvm-objcopy/MachO/Inputs/x86_64.yaml
  llvm/test/tools/llvm-objcopy/MachO/install-name-tool-add-rpath.test
  llvm/tools/llvm-objcopy/CMakeLists.txt
  llvm/tools/llvm-objcopy/CopyConfig.cpp
  llvm/tools/llvm-objcopy/CopyConfig.h
  llvm/tools/llvm-objcopy/InstallNameToolOpts.td
  llvm/tools/llvm-objcopy/MachO/MachOObjcopy.cpp
  llvm/tools/llvm-objcopy/MachO/Object.cpp
  llvm/tools/llvm-objcopy/MachO/Object.h
  llvm/tools/llvm-objcopy/llvm-objcopy.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69146.225536.patch
Type: text/x-patch
Size: 16910 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191017/fae9f700/attachment-0001.bin>


More information about the llvm-commits mailing list