summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-objdump/COFFDump.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2014-09-10 12:51:52 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2014-09-10 12:51:52 +0000
commit44f51e511374f467d70c37324a8e5bbf2ea270d8 (patch)
tree3073f00e67964e434982e150df56ac5a33a4a6fb /llvm/tools/llvm-objdump/COFFDump.cpp
parent5d34a2b887a985651cd098153506c45227123b65 (diff)
downloadbcm5719-llvm-44f51e511374f467d70c37324a8e5bbf2ea270d8.tar.gz
bcm5719-llvm-44f51e511374f467d70c37324a8e5bbf2ea270d8.zip
Object: Add support for bigobj
This adds support for reading the "bigobj" variant of COFF produced by cl's /bigobj and mingw's -mbig-obj. The most significant difference that bigobj brings is more than 2**16 sections to COFF. bigobj brings a few interesting differences with it: - It doesn't have a Characteristics field in the file header. - It doesn't have a SizeOfOptionalHeader field in the file header (it's only used in executable files). - Auxiliary symbol records have the same width as a symbol table entry. Since symbol table entries are bigger, so are auxiliary symbol records. Write support will come soon. Differential Revision: http://reviews.llvm.org/D5259 llvm-svn: 217496
Diffstat (limited to 'llvm/tools/llvm-objdump/COFFDump.cpp')
-rw-r--r--llvm/tools/llvm-objdump/COFFDump.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/llvm/tools/llvm-objdump/COFFDump.cpp b/llvm/tools/llvm-objdump/COFFDump.cpp
index 39d8e8e39f8..818969114ba 100644
--- a/llvm/tools/llvm-objdump/COFFDump.cpp
+++ b/llvm/tools/llvm-objdump/COFFDump.cpp
@@ -260,11 +260,8 @@ static void printLoadConfiguration(const COFFObjectFile *Obj) {
if (!PE32Header)
return;
- const coff_file_header *Header;
- if (error(Obj->getCOFFHeader(Header)))
- return;
// Currently only x86 is supported
- if (Header->Machine != COFF::IMAGE_FILE_MACHINE_I386)
+ if (Obj->getMachine() != COFF::IMAGE_FILE_MACHINE_I386)
return;
const data_directory *DataDir;
@@ -518,11 +515,7 @@ static void printRuntimeFunctionRels(const COFFObjectFile *Obj,
}
void llvm::printCOFFUnwindInfo(const COFFObjectFile *Obj) {
- const coff_file_header *Header;
- if (error(Obj->getCOFFHeader(Header)))
- return;
-
- if (Header->Machine != COFF::IMAGE_FILE_MACHINE_AMD64) {
+ if (Obj->getMachine() != COFF::IMAGE_FILE_MACHINE_AMD64) {
errs() << "Unsupported image machine type "
"(currently only AMD64 is supported).\n";
return;
OpenPOWER on IntegriCloud