Commit Graph

7 Commits

Author SHA1 Message Date
Seiya Nuta d3ca385e82 [llvm-objcopy][MachO] Rebuild the symbol/string table in the writer
Summary: Build the string table using StringTableBuilder, reassign symbol indices, and update symbol indices in relocations to allow adding/modifying/removing symbols from the object.

Reviewers: alexshap, rupprecht, jhenderson

Reviewed By: alexshap

Subscribers: mgorny, jakehehrlich, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D63309

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364000 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-21 00:21:50 +00:00
Simon Pilgrim de3f297928 Fix MSVC "32-bit shift implicitly converted to 64 bits" warning. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362927 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-10 10:13:32 +00:00
Seiya Nuta 770bd56d0d [llvm-objcopy][MachO] Recompute and update offset/size fields in the writer
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362863 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-08 01:22:54 +00:00
Jordan Rupprecht 0502ddb2a6 [llvm-objcopy][NFC] Remove unnecessary llvm-objcopy.h #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356109 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-13 23:40:16 +00:00
Chandler Carruth 68e4016eed Update new files added to llvm-objcopy to use the new file header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353666 91177308-0d34-0410-b5e6-96231b3b80d8
2019-02-11 08:25:19 +00:00
Jordan Rupprecht 53171e3cf8 [llvm-objcopy][NFC] simplify an error return
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353074 91177308-0d34-0410-b5e6-96231b3b80d8
2019-02-04 19:09:20 +00:00
Alexander Shaposhnikov 49db1b9235 [llvm-objcopy] Add ability to copy MachO object files
This diff implements first bits for copying (without modification) MachO object files.

Test plan: make check-all

Differential revision: https://reviews.llvm.org/D54674


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@352944 91177308-0d34-0410-b5e6-96231b3b80d8
2019-02-02 00:38:07 +00:00