[PATCH] D113734: [llvm-objcopy][MachO] Add llvm-strip support for newer load commands
Keith Smiley via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 12 13:02:43 PST 2021
keith added a comment.
In D113734#3126543 <https://reviews.llvm.org/D113734#3126543>, @jhenderson wrote:
> In D113734#3126419 <https://reviews.llvm.org/D113734#3126419>, @keith wrote:
>
>> I'm not sure how this should be tested since there aren't cases where we actually link binaries before being able to run this
>
> I'm not too familiar with the Mach-O side of llvm-objcopy, but a quick search shows that at least some (possibly all) of the existing load commands are tested using yaml2obj-generated inputs. Take a look at the eixsting tests like lc-load-weak-dylib.test. If yaml2obj support needs to be extended for the new load commands, it should be fairly simple to do so.
Yea this make sense, my problem is that the failure case I hit while testing this was that the strip would succeed, but the binary would be malformed because of these offsets being incorrectly calculated, and fail to execute. So I need to come up with some thorough before and after for that I guess
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113734/new/
https://reviews.llvm.org/D113734
More information about the llvm-commits
mailing list