summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-objcopy/MachO/MachOObjcopy.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [llvm-objcopy][MachO] Implement --add-sectionSeiya Nuta2019-12-161-5/+65
| | | | | | | | | | | | Reviewers: alexshap, rupprecht, jhenderson Reviewed By: alexshap, jhenderson Subscribers: mgorny, jakehehrlich, abrachet, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66283
* [llvm-objcopy][MachO] Implement --dump-sectionSeiya Nuta2019-11-251-5/+34
| | | | | | | | | | | | Reviewers: alexshap, rupprecht, jhenderson Reviewed By: alexshap, rupprecht, jhenderson Subscribers: MaskRay, jakehehrlich, abrachet, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66408
* [llvm-objcopy][MachO] Implement --strip-debugFangrui Song2019-11-211-3/+3
| | | | | | Reviewed By: alexshap Differential Revision: https://reviews.llvm.org/D70476
* Introduce llvm-install-name-toolAlexander Shaposhnikov2019-11-191-1/+25
| | | | | | | | | | This diff adds a new "driver" for llvm-objcopy which is supposed to emulate the behavior of install-name-tool. This is a recommit of b5913e6 with ubsan, test dependencies issues fixed. Differential revision: https://reviews.llvm.org/D69146 Test plan: make check-all
* Revert "Introduce llvm-install-name-tool"Alexander Shaposhnikov2019-11-191-25/+1
| | | | | This temporarily reverts the commit 88f00aef684ff84a6494e1f17d5466c5678f703d. The change broke the buildbot http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/36836
* Introduce llvm-install-name-toolAlexander Shaposhnikov2019-11-191-1/+25
| | | | | | | | | | This diff adds a new "driver" for llvm-objcopy which is supposed to emulate the behavior of install-name-tool. This is a recommit of b5913e6d2 with ubsan issues fixed. Differential revision: https://reviews.llvm.org/D69146 Test plan: make check-all
* [llvm-objcopy][MachO] Implement --redefine-sym and --redefine-symsFangrui Song2019-11-151-3/+9
| | | | | | | | | | Similar to D46029 (ELF) and D70036 (COFF), but for MachO. Note, when --strip-symbol (not implemented for MachO) is also specified, --redefine-sym executes before --strip-symbol. Reviewed By: jhenderson, seiya Differential Revision: https://reviews.llvm.org/D70212
* [llvm-objcopy][MachO] Implement --remove-sectionSeiya Nuta2019-11-151-5/+12
| | | | | | | | | | | | Reviewers: alexshap, rupprecht, jhenderson Reviewed By: rupprecht, jhenderson Subscribers: jakehehrlich, abrachet, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66282
* Revert "Introduce llvm-install-name-tool"Alexander Shaposhnikov2019-11-061-25/+1
| | | | This reverts commit b5913e6d2f6d13fb753df701619731ca11936316.
* Introduce llvm-install-name-toolAlexander Shaposhnikov2019-11-061-1/+25
| | | | | | | | | This diff adds a new "driver" for llvm-objcopy which is supposed to emulate the behavior of install-name-tool. Differential revision: https://reviews.llvm.org/D69146 Test plan: make check-all
* [llvm-objcopy][MachO] Implement --strip-allSeiya Nuta2019-10-311-3/+42
| | | | | | | | | | | | Reviewers: alexshap, rupprecht, jdoerfert, jhenderson Reviewed By: alexshap Subscribers: jakehehrlich, abrachet, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66281
* [llvm-objcopy][MachO] Implement --only-sectionSeiya Nuta2019-10-281-5/+18
| | | | | | | | | | | | Reviewers: alexshap, rupprecht, jdoerfert, jhenderson Reviewed By: alexshap, rupprecht, jhenderson Subscribers: mgorny, jakehehrlich, abrachet, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65541
* [llvm-objcopy] Add --set-section-alignmentFangrui Song2019-10-021-7/+8
| | | | | | | | | | | | | Fixes PR43181. This option was recently added to GNU objcopy (binutils PR24942). `llvm-objcopy -I binary -O elf64-x86-64 --set-section-alignment .data=8` can set the alignment of .data. Reviewed By: grimar, jhenderson, rupprecht Differential Revision: https://reviews.llvm.org/D67656 llvm-svn: 373461
* [llvm-objcopy] Allow the visibility of symbols created by --binary andChris Jackson2019-08-301-4/+5
| | | | | | --add-symbol to be specified with --new-symbol-visibility llvm-svn: 370458
* Recommit "[llvm-objcopy][MachO] Support load commands used in ↵Seiya Nuta2019-08-191-1/+5
| | | | | | | | | | | | | | | | | | | | | executables/shared libraries" Summary: This patch implements copying some load commands that appear in executables/shared libraries such as the indirect symbol table. I don't add tests intentionally because this patch is incomplete: we need a layout algorithm for executables/shared libraries. I'll submit it as a separate patch with tests. Reviewers: alexshap, rupprecht, jhenderson, compnerd Reviewed By: alexshap Subscribers: abrachet, mgorny, mgrang, MaskRay, mtrent, jakehehrlich, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63395 llvm-svn: 369298
* Revert r369230 and r369231Seiya Nuta2019-08-191-5/+1
| | | | | | | | | | Looks these commits break CI builds: - http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-gn/builds/4159 This commit reverts r369230 and r369231 (git coommit: 4a198a7 and dee9546). llvm-svn: 369234
* [llvm-objcopy][MachO] Support load commands used in executables/shared librariesSeiya Nuta2019-08-191-1/+5
| | | | | | | | | | | | | | | | | | | Summary: This patch implements copying some load commands that appear in executables/shared libraries such as the indirect symbol table. I don't add tests intentionally because this patch is incomplete: we need a layout algorithm for executables/shared libraries. I'll submit it as a separate patch with tests. Reviewers: alexshap, rupprecht, jhenderson, compnerd Reviewed By: alexshap Subscribers: abrachet, mgorny, mgrang, MaskRay, mtrent, jakehehrlich, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63395 llvm-svn: 369230
* [llvm-objcopy][MachO] Recompute and update offset/size fields in the writerSeiya Nuta2019-06-081-0/+2
| | | | | | | | | | | | | | | | | | | | Summary: Recompute and update offset/size fields so that we can implement llvm-objcopy options like --only-section. This patch is the first step and focuses on supporting load commands that covered by existing tests: executable files and dynamic libraries are not supported. Reviewers: alexshap, rupprecht, jhenderson Reviewed By: alexshap, rupprecht Subscribers: compnerd, jakehehrlich, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62652 llvm-svn: 362863
* [llvm-objcopy][MachO] Print an error message on use of unsupported optionsSeiya Nuta2019-05-291-1/+37
| | | | | | | | | | | | | | | | | | | Summary: It is better to print an error message instead of silently ignoring unsupported options. As mentioned in https://reviews.llvm.org/D57045, this is not the best solution and we should print which flag is not supported at some time. Reviewers: alexshap, rupprecht, jhenderson, jakehehrlich Reviewed By: alexshap, rupprecht, jakehehrlich Subscribers: jakehehrlich, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62578 llvm-svn: 362040
* [llvm-objcopy][NFC] Remove unnecessary llvm-objcopy.h #includesJordan Rupprecht2019-03-131-1/+0
| | | | llvm-svn: 356109
* Update new files added to llvm-objcopy to use the new file header.Chandler Carruth2019-02-111-4/+3
| | | | llvm-svn: 353666
* [llvm-objcopy] Add ability to copy MachO object filesAlexander Shaposhnikov2019-02-021-0/+32
This diff implements first bits for copying (without modification) MachO object files. Test plan: make check-all Differential revision: https://reviews.llvm.org/D54674 llvm-svn: 352944
OpenPOWER on IntegriCloud