llvm-objdump/COFF: Print load configuration table.

Load Configuration Table may contain a pointer to SEH table. This patch is to
print the offset to the table. Printing SEH table contents is a TODO.

The layout of Layout Configuration Table is described in Microsoft PE/COFF
Object File Format Spec, but the table's offset/size descriptions seems to be
totally wrong, at least in revision 8.3 of the spec. I believe the table in
this patch is the correct one.

llvm-svn: 201638
diff --git a/llvm/test/tools/llvm-objdump/coff-private-headers.test b/llvm/test/tools/llvm-objdump/coff-private-headers.test
index de3de90..24d1b96 100644
--- a/llvm/test/tools/llvm-objdump/coff-private-headers.test
+++ b/llvm/test/tools/llvm-objdump/coff-private-headers.test
@@ -1,11 +1,37 @@
 // RUN: llvm-objdump -p %p/Inputs/nop.exe.coff-i386 | \
 // RUN:   FileCheck -check-prefix=IMPORT %s
 
-IMPORT:       The Import Tables:
-IMPORT-NEXT:  lookup 00005028 time 00000000 fwd 00000000 name 00005096 addr 00005058
-IMPORT:       DLL Name: KERNEL32.dll
+IMPORT:      The Import Tables:
+IMPORT:        lookup 000021e4 time 00000000 fwd 00000000 name 0000234a addr 00002024
+IMPORT:          DLL Name: MSVCR110.dll
 IMPORT-NEXT:     Hint/Ord  Name
-IMPORT-NEXT:          365  ExitProcess
+IMPORT-NEXT:          767  _initterm_e
+IMPORT-NEXT:          766  _initterm
+IMPORT-NEXT:          437  __initenv
+IMPORT-NEXT:          660  _fmode
+IMPORT-NEXT:          571  _commode
+IMPORT-NEXT:          315  ?terminate@@YAXXZ
+IMPORT-NEXT:          424  __crtSetUnhandledExceptionFilter
+IMPORT-NEXT:          892  _lock
+IMPORT-NEXT:         1254  _unlock
+IMPORT-NEXT:          498  __setusermatherr
+IMPORT-NEXT:          428  __dllonexit
+IMPORT-NEXT:         1058  _onexit
+IMPORT-NEXT:          774  _invoke_watson
+IMPORT-NEXT:          575  _controlfp_s
+IMPORT-NEXT:          624  _except_handler4_common
+IMPORT-NEXT:          587  _crt_debugger_hook
+IMPORT-NEXT:          426  __crtUnhandledException
+IMPORT-NEXT:          425  __crtTerminateProcess
+IMPORT-NEXT:          572  _configthreadlocale
+IMPORT-NEXT:          556  _cexit
+IMPORT-NEXT:          633  _exit
+IMPORT-NEXT:         1484  exit
+IMPORT-NEXT:          496  __set_app_type
+IMPORT-NEXT:          436  __getmainargs
+IMPORT-NEXT:          533  _amsg_exit
+IMPORT-NEXT:          555  _calloc_crt
+IMPORT-NEXT:          367  _XcptFilter
 
 // RUN: llvm-objdump -p %p/Inputs/export.dll.coff-i386 | \
 // RUN:   FileCheck -check-prefix=EXPORT %s
@@ -16,3 +42,25 @@
 EXPORT-NEXT:  Ordinal      RVA  Name
 EXPORT-NEXT:        5   0x2008
 EXPORT-NEXT:        6   0x2010  exportfn2
+
+// RUN: llvm-objdump -p %p/Inputs/nop.exe.coff-i386 | \
+// RUN:   FileCheck -check-prefix=LOADCFG %s
+
+LOADCFG:      Load configuration:
+LOADCFG-NEXT:   Timestamp: 0
+LOADCFG-NEXT:   Major Version: 0
+LOADCFG-NEXT:   Minor Version: 0
+LOADCFG-NEXT:   GlobalFlags Clear: 0
+LOADCFG-NEXT:   GlobalFlags Set: 0
+LOADCFG-NEXT:   Critical Section Default Timeout: 0
+LOADCFG-NEXT:   Decommit Free Block Threshold: 0
+LOADCFG-NEXT:   Decommit Total Free Threshold: 0
+LOADCFG-NEXT:   Lock Prefix Table: 0
+LOADCFG-NEXT:   Maximum Allocation Size: 0
+LOADCFG-NEXT:   Virtual Memory Threshold: 0
+LOADCFG-NEXT:   Process Affinity Mask: 0
+LOADCFG-NEXT:   Process Heap Flags: 0
+LOADCFG-NEXT:   CSD Version: 0
+LOADCFG-NEXT:   Security Cookie: 554696768
+LOADCFG-NEXT:   SEH Table: 65600
+LOADCFG-NEXT:   SEH Count: 0