[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:55:58 PST 2021
keith added a comment.
In D113734#3128319 <https://reviews.llvm.org/D113734#3128319>, @aprantl 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
>
> Just last week I added a new option to obj2yaml to dump the entire raw LINKEDIT/DATA segment of a binary. Maybe this is helpful here.
I'm not sure what the backwards compat should be with previous versions of nm (or maybe just apple's cctools version in general), but it looks like there are some issues with this today:
% echo "int main() { return 0; }" > /tmp/bar.c
% clang /tmp/bar.c -o /tmp/main
% nm /tmp/main
0000000100000000 T __mh_execute_header
0000000100003fa4 T _main
% ./bin/obj2yaml /tmp/main | ./bin/yaml2obj > /tmp/new
% nm /tmp/new
LLVM ERROR: bad chained fixups: unknown imports format: 0
zsh: abort nm /tmp/new
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