summaryrefslogtreecommitdiff
path: root/tools/obj2yaml/obj2yaml.cpp
diff options
context:
space:
mode:
authorSimon Atanasyan <simon@atanasyan.com>2014-05-14 05:07:47 +0000
committerSimon Atanasyan <simon@atanasyan.com>2014-05-14 05:07:47 +0000
commitb8236e532a9bc5e0c6684a0b51f808d4754272bd (patch)
tree6b8bb07cc323e06c40b3fa126a36294478296c86 /tools/obj2yaml/obj2yaml.cpp
parent0fe443d8932b68ebbe281141ef79f81ee97e292d (diff)
downloadllvm-b8236e532a9bc5e0c6684a0b51f808d4754272bd.tar.gz
llvm-b8236e532a9bc5e0c6684a0b51f808d4754272bd.tar.bz2
llvm-b8236e532a9bc5e0c6684a0b51f808d4754272bd.tar.xz
[obj2yaml] Support ELF input format in the obj2yaml tool.
The ELF header e_flags field in the MIPS related test cases handled incorrectly. The obj2yaml prints too many flags. I will fix that in the next patches. The patch reviewed by Michael Spencer and Sean Silva. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208752 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/obj2yaml/obj2yaml.cpp')
-rw-r--r--tools/obj2yaml/obj2yaml.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/obj2yaml/obj2yaml.cpp b/tools/obj2yaml/obj2yaml.cpp
index 493a0ce301..7fe034d5b4 100644
--- a/tools/obj2yaml/obj2yaml.cpp
+++ b/tools/obj2yaml/obj2yaml.cpp
@@ -22,6 +22,8 @@ using namespace llvm::object;
static error_code dumpObject(const ObjectFile &Obj) {
if (Obj.isCOFF())
return coff2yaml(outs(), cast<COFFObjectFile>(Obj));
+ if (Obj.isELF())
+ return elf2yaml(outs(), Obj);
return obj2yaml_error::unsupported_obj_file_format;
}