llvm-objdump: Dump COFF import table if -private-headers option is given.
authorRui Ueyama <ruiu@google.com>
Fri, 27 Sep 2013 00:07:01 +0000 (00:07 +0000)
committerRui Ueyama <ruiu@google.com>
Fri, 27 Sep 2013 00:07:01 +0000 (00:07 +0000)
commit5b1adbaad9a18084e4da2cac4216b828c179d40f
tree93482a3ba0934585195688873c42b672df810ca0
parent6ac40036f152242e1bfae177614c090e1995d824
llvm-objdump: Dump COFF import table if -private-headers option is given.

This is a patch to add capability to llvm-objdump to dump COFF Import Table
entries, so that we can write tests for LLD checking Import Table contents.

llvm-objdump did not print anything but just file name if the format is COFF
and -private-headers option is given. This is a patch adds capability for
dumping DLL Import Table, which is specific to the COFF format.

In this patch I defined a new iterator to iterate over import table entries.
Also added a few functions to COFFObjectFile.cpp to access fields of the entry.

Differential Revision: http://llvm-reviews.chandlerc.com/D1719

llvm-svn: 191472
15 files changed:
llvm/include/llvm/Object/COFF.h
llvm/lib/Object/COFFObjectFile.cpp
llvm/test/tools/llvm-objdump/Inputs/nop.exe.coff-i386 [new file with mode: 0644]
llvm/test/tools/llvm-objdump/Inputs/trivial.obj.elf-i386 [new file with mode: 0644]
llvm/test/tools/llvm-objdump/Inputs/win64-unwind.exe.coff-x86_64 [new file with mode: 0644]
llvm/test/tools/llvm-objdump/Inputs/win64-unwind.exe.coff-x86_64.asm [new file with mode: 0644]
llvm/test/tools/llvm-objdump/coff-private-headers.test [new file with mode: 0644]
llvm/test/tools/llvm-objdump/disassembly-show-raw.s [deleted file]
llvm/test/tools/llvm-objdump/disassembly-show-raw.test [new file with mode: 0644]
llvm/test/tools/llvm-objdump/lit.local.cfg [deleted file]
llvm/test/tools/llvm-objdump/win64-unwind-data.s [deleted file]
llvm/test/tools/llvm-objdump/win64-unwind-data.test [new file with mode: 0644]
llvm/tools/llvm-objdump/COFFDump.cpp
llvm/tools/llvm-objdump/llvm-objdump.cpp
llvm/tools/llvm-objdump/llvm-objdump.h