[llvm-objcopy][MachO] Fix cmdsize of LC_RPATH
authorAlexander Shaposhnikov <alexshap@fb.com>
Fri, 12 Jun 2020 02:55:04 +0000 (19:55 -0700)
committerAlexander Shaposhnikov <alexshap@fb.com>
Fri, 12 Jun 2020 02:55:04 +0000 (19:55 -0700)
commitc966ed8dc7ce7629c4371314e5ec2119b84e852c
tree532384089fc48865b31462ca8b6895181e9a7662
parent526e0c8d15216e6c49b1769c63f5433df6841c64
[llvm-objcopy][MachO] Fix cmdsize of LC_RPATH

Fix the calculation of the field cmdsize (in the function buildRPathLoadCommand)
to account for the null byte terminator.

Patch by Sameer Arora!

Test plan: make check-all

Differential revision: https://reviews.llvm.org/D81575
llvm/test/tools/llvm-objcopy/MachO/install-name-tool-add-rpath.test
llvm/tools/llvm-objcopy/MachO/MachOObjcopy.cpp