[PATCH] Path: Recognize COFF import library file magic.

Rui Ueyama ruiu at google.com
Fri Nov 15 12:58:48 PST 2013

Comment at: test/tools/llvm-readobj/file-headers.test:210
@@ +209,3 @@
+COFF-IMPORTLIB-NEXT:   SectionCount: 65535
+COFF-IMPORTLIB-NEXT:   TimeDateStamp: 1970-09-09 19:52:32 (0x14C0000)
Rafael Ávila de Espíndola wrote:
> Should we special case to not print this? If the file has no sections, we should probably just not print this line.
Yeah we shouldn't, but I guess it's out of scope of this patch -- this is for identifying COFF import library file as a COFF file. llvm-readobj cannot really handle import library yet. It reads the header as a regular COFF object and skips everything else. I'm planning to extend llvm-readobj to handle such files properly but it's not going to be in this patch.

Comment at: test/tools/llvm-readobj/file-headers.test:213
@@ +212,3 @@
+COFF-IMPORTLIB-NEXT:   PointerToSymbolTable: 0x528542EB
+COFF-IMPORTLIB-NEXT:   SymbolCount: 20
+COFF-IMPORTLIB-NEXT:   OptionalHeaderSize: 0
Rafael Ávila de Espíndola wrote:
> The symbols are real, right? Can you pass -symbols to llvm-readobj and check them too?
The import library's structure is completely different from the regular COFF, they share the same header but the contents are in different formats. llvm-readobj cannot read any symbols from an import library yet.


More information about the llvm-commits mailing list