[PATCH] D78474: [llvm-objcopy][MachO] Make --remove-section clean up dead symbols
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 20 01:02:30 PDT 2020
jhenderson added inline comments.
================
Comment at: llvm/test/tools/llvm-objcopy/MachO/remove-section-dead-symbols.test:4
+
+# RUN: llvm-readobj --sections --symbols %t.copy | FileCheck %s
+
----------------
What's the reason for dumping the sections here?
================
Comment at: llvm/test/tools/llvm-objcopy/MachO/remove-section-error.test:2
+# RUN: yaml2obj %s -o %t
+# RUN: not llvm-objcopy --remove-section __DATA,C %t %t.copy 2>&1 | FileCheck %s
+
----------------
You can probably use /dev/null as the output file here.
================
Comment at: llvm/test/tools/llvm-objcopy/MachO/remove-section-error.test:98
+ reserved3: 0x00000000
+ content: 1400000000000000017A520001781001100C070890010000240000001C000000B0FFFFFFFFFFFFFF0C0000000000000000410E108602430D0600000000000000
+ - cmd: LC_VERSION_MIN_MACOSX
----------------
I know that mach-o yaml2obj requires very noisy output, but I'm guessing you don't need eh_frame data at least? Similarly, is there anything else you can remove?
================
Comment at: llvm/tools/llvm-objcopy/MachO/Object.cpp:1
#include "Object.h"
#include "../llvm-objcopy.h"
----------------
Could you fix the missing licence header please? Can be a separate change, no review needed.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78474/new/
https://reviews.llvm.org/D78474
More information about the llvm-commits
mailing list