[llvm-objcopy] Reorder --dump-section for MachO
authorSameer Arora <sameerarora101@fb.com>
Fri, 5 Jun 2020 17:47:05 +0000 (10:47 -0700)
committerShoaib Meenai <smeenai@fb.com>
Fri, 5 Jun 2020 17:49:22 +0000 (10:49 -0700)
commit12e5b02687af0ddc21abfdd17afbc2176fdaa3f9
tree12bebf34477693af99d7c0de80cb7882e5f05d8f
parenteb7db879af4f550da820e092e7b791243a3166f8
[llvm-objcopy] Reorder --dump-section for MachO

Reorder `DumpSection` under `handleArgs` in file `MachOObjcopy.cpp`. The
operation to dump a section is now performed before both add and remove
section operations for MachO file format.

Change for the ELF format at D81097. Together fixes
https://bugs.llvm.org/show_bug.cgi?id=44283

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D81123
llvm/test/tools/llvm-objcopy/MachO/dump-section-before-add-remove.test [new file with mode: 0644]
llvm/tools/llvm-objcopy/MachO/MachOObjcopy.cpp