OSDN Git Service

Reland "[llvm][llvm-objcopy] Added support for outputting to binary in llvm-objcopy"
authorPetr Hosek <phosek@chromium.org>
Fri, 4 Aug 2017 21:09:26 +0000 (21:09 +0000)
committerPetr Hosek <phosek@chromium.org>
Fri, 4 Aug 2017 21:09:26 +0000 (21:09 +0000)
commit125fb1e9a91ec1bd5ea236ac9818e1e27f044d38
treecbeda19c02598437ffe065454cb537f3b633a74e
parentd7f757cc8235782aca7db5ec9f45a821b1c3af5c
Reland "[llvm][llvm-objcopy] Added support for outputting to binary in llvm-objcopy"

This change adds the "-O binary" flag which directs llvm-objcopy to
output the object file to the same format as GNU objcopy does when given
the flag "-O binary". This was done by splitting the Object class into
two subclasses ObjectELF and ObjectBianry which each output a different
format but relay on the same code to read in the Object in Object.

Patch by Jake Ehrlich

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310127 91177308-0d34-0410-b5e6-96231b3b80d8
test/tools/llvm-objcopy/basic-align-copy.test [new file with mode: 0644]
test/tools/llvm-objcopy/basic-binary-copy.test [new file with mode: 0644]
tools/llvm-objcopy/LLVMBuild.txt
tools/llvm-objcopy/Object.cpp
tools/llvm-objcopy/Object.h
tools/llvm-objcopy/llvm-objcopy.cpp