1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00
llvm-mirror/tools/llvm-objcopy
Peter Collingbourne 1fe1482c3b llvm-objcopy: Implement --extract-partition and --extract-main-partition.
This implements the functionality described in
https://lld.llvm.org/Partitions.html. It works as follows:

- Reads the section headers using the ELF header at file offset 0;
- If extracting a loadable partition:
  - Finds the section containing the required partition ELF header by looking it up in the section table;
  - Reads the ELF and program headers from the section.
- If extracting the main partition:
  - Reads the ELF and program headers from file offset 0.
- Filters the section table according to which sections are in the program headers that it read:
  - If ParentSegment != nullptr or section is not SHF_ALLOC, then it goes in.
  - Sections containing partition ELF headers or program headers are excluded as there are no headers for these in ordinary ELF files.

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

llvm-svn: 362818
2019-06-07 17:57:48 +00:00
..
COFF [llvm-objcopy] Tidy up error messages 2019-05-22 13:23:26 +00:00
ELF llvm-objcopy: Implement --extract-partition and --extract-main-partition. 2019-06-07 17:57:48 +00:00
MachO [llvm-objcopy][MachO] Print an error message on use of unsupported options 2019-05-29 22:21:12 +00:00
Buffer.cpp [llvm-objcopy][NFC] Remove unnecessary llvm-objcopy.h #includes 2019-03-13 23:40:16 +00:00
Buffer.h [llvm-objcopy] Fix crash when writing empty binary output 2019-01-28 15:02:40 +00:00
CMakeLists.txt [llvm-objcopy] Add ability to copy MachO object files 2019-02-02 00:38:07 +00:00
CopyConfig.cpp llvm-objcopy: Implement --extract-partition and --extract-main-partition. 2019-06-07 17:57:48 +00:00
CopyConfig.h llvm-objcopy: Implement --extract-partition and --extract-main-partition. 2019-06-07 17:57:48 +00:00
llvm-objcopy.cpp [llvm-objcopy] test commit 2019-06-01 07:36:57 +00:00
llvm-objcopy.h Small refactoring of FileError. NFC. 2019-02-11 09:49:37 +00:00
LLVMBuild.txt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ObjcopyOpts.td llvm-objcopy: Implement --extract-partition and --extract-main-partition. 2019-06-07 17:57:48 +00:00
StripOpts.td [llvm-strip]Add --no-strip-all to disable --strip-all behaviour (including default stripping) 2019-05-02 11:53:02 +00:00