OSDN Git Service

[llvm-objcopy]Add support for *-freebsd output formats
authorJames Henderson <jh7370@my.bristol.ac.uk>
Fri, 22 Mar 2019 10:21:09 +0000 (10:21 +0000)
committerJames Henderson <jh7370@my.bristol.ac.uk>
Fri, 22 Mar 2019 10:21:09 +0000 (10:21 +0000)
commit3c1091398ef32e230436656fb12b90a6474b8a81
tree227864f4e93d38ae0acb1bd5686664feab8f978d
parent49e838386166e09d38a85747499d4076f5696db5
[llvm-objcopy]Add support for *-freebsd output formats

GNU objcopy can support output formats like elf32-i386-freebsd and
elf64-x86-64-freebsd. The only difference from their regular non-freebsd
counterparts that I have observed is that the freebsd versions set the
OS/ABI field to ELFOSABI_FREEBSD. This patch sets the OS/ABI field
according based on the format whenever --output-format is specified.

Reviewed by: rupprecht, grimar

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356737 91177308-0d34-0410-b5e6-96231b3b80d8
test/tools/llvm-objcopy/ELF/binary-input-with-arch.test
test/tools/llvm-objcopy/ELF/cross-arch-headers.test
tools/llvm-objcopy/CopyConfig.cpp
tools/llvm-objcopy/CopyConfig.h
tools/llvm-objcopy/ELF/ELFObjcopy.cpp