| Line 1... | Line 1... | 
      
        | /* Internal format of COFF object file data structures, for GNU BFD.
 | /* Internal format of COFF object file data structures, for GNU BFD.
 | 
      
        |    This file is part of BFD, the Binary File Descriptor library.
 |    This file is part of BFD, the Binary File Descriptor library.
 | 
      
        |  
 |  
 | 
      
        |    Copyright 1999, 2000, 2001, 2002, 2003, 2004. 2005, 2006, 2007
 |    Copyright 1999, 2000, 2001, 2002, 2003, 2004. 2005, 2006, 2007, 2009
 | 
      
        |    Free Software Foundation, Inc.
 |    Free Software Foundation, Inc.
 | 
      
        |  
 |  
 | 
      
        |    This program is free software; you can redistribute it and/or modify
 |    This program is free software; you can redistribute it and/or modify
 | 
      
        |    it under the terms of the GNU General Public License as published by
 |    it under the terms of the GNU General Public License as published by
 | 
      
        |    the Free Software Foundation; either version 2 of the License, or
 |    the Free Software Foundation; either version 2 of the License, or
 | 
      
        | Line 56... | Line 56... | 
      
        |   bfd_vma  e_lfanew;            /* File address of new exe header, 0x80 */
 |   bfd_vma  e_lfanew;            /* File address of new exe header, 0x80 */
 | 
      
        |   unsigned long dos_message[16]; /* text which always follows dos header */
 |   unsigned long dos_message[16]; /* text which always follows dos header */
 | 
      
        |   bfd_vma  nt_signature;        /* required NT signature, 0x4550 */
 |   bfd_vma  nt_signature;        /* required NT signature, 0x4550 */
 | 
      
        | };
 | };
 | 
      
        |  
 |  
 | 
      
        |   | #define GO32_STUBSIZE 2048
 | 
      
        |   |  
 | 
      
        | struct internal_filehdr
 | struct internal_filehdr
 | 
      
        | {
 | {
 | 
      
        |   struct internal_extra_pe_filehdr pe;
 |   struct internal_extra_pe_filehdr pe;
 | 
      
        |  
 |  
 | 
      
        |   |   /* coff-stgo32 EXE stub header before BFD tdata has been allocated.
 | 
      
        |   |      Its data is kept in INTERNAL_FILEHDR.GO32STUB afterwards.
 | 
      
        |   |  
 | 
      
        |   |      F_GO32STUB is set iff go32stub contains a valid data.  Artifical headers
 | 
      
        |   |      created in BFD have no pre-set go32stub.  */
 | 
      
        |   |   char go32stub[GO32_STUBSIZE];
 | 
      
        |   |  
 | 
      
        |   /* Standard coff internal info.  */
 |   /* Standard coff internal info.  */
 | 
      
        |   unsigned short f_magic;       /* magic number                 */
 |   unsigned short f_magic;       /* magic number                 */
 | 
      
        |   unsigned short f_nscns;       /* number of sections           */
 |   unsigned short f_nscns;       /* number of sections           */
 | 
      
        |   long f_timdat;                /* time & date stamp            */
 |   long f_timdat;                /* time & date stamp            */
 | 
      
        |   bfd_vma f_symptr;             /* file pointer to symtab       */
 |   bfd_vma f_symptr;             /* file pointer to symtab       */
 | 
      
        | Line 82... | Line 91... | 
      
        |         F_AR16WR        file is 16-bit little-endian
 |         F_AR16WR        file is 16-bit little-endian
 | 
      
        |         F_AR32WR        file is 32-bit little-endian
 |         F_AR32WR        file is 32-bit little-endian
 | 
      
        |         F_AR32W         file is 32-bit big-endian
 |         F_AR32W         file is 32-bit big-endian
 | 
      
        |         F_DYNLOAD       rs/6000 aix: dynamically loadable w/imports & exports
 |         F_DYNLOAD       rs/6000 aix: dynamically loadable w/imports & exports
 | 
      
        |         F_SHROBJ        rs/6000 aix: file is a shared object
 |         F_SHROBJ        rs/6000 aix: file is a shared object
 | 
      
        |         F_DLL           PE format DLL.  */
 |         F_DLL           PE format DLL
 | 
      
        |   |         F_GO32STUB      Field go32stub contains valid data.  */
 | 
      
        |  
 |  
 | 
      
        | #define F_RELFLG        (0x0001)
 | #define F_RELFLG        (0x0001)
 | 
      
        | #define F_EXEC          (0x0002)
 | #define F_EXEC          (0x0002)
 | 
      
        | #define F_LNNO          (0x0004)
 | #define F_LNNO          (0x0004)
 | 
      
        | #define F_LSYMS         (0x0008)
 | #define F_LSYMS         (0x0008)
 | 
      
        | Line 94... | Line 104... | 
      
        | #define F_AR32WR        (0x0100)
 | #define F_AR32WR        (0x0100)
 | 
      
        | #define F_AR32W         (0x0200)
 | #define F_AR32W         (0x0200)
 | 
      
        | #define F_DYNLOAD       (0x1000)
 | #define F_DYNLOAD       (0x1000)
 | 
      
        | #define F_SHROBJ        (0x2000)
 | #define F_SHROBJ        (0x2000)
 | 
      
        | #define F_DLL           (0x2000)
 | #define F_DLL           (0x2000)
 | 
      
        |   | #define F_GO32STUB      (0x4000)
 | 
      
        |  
 |  
 | 
      
        | /* Extra structure which is used in the optional header.  */
 | /* Extra structure which is used in the optional header.  */
 | 
      
        | typedef struct _IMAGE_DATA_DIRECTORY
 | typedef struct _IMAGE_DATA_DIRECTORY
 | 
      
        | {
 | {
 | 
      
        |   bfd_vma VirtualAddress;
 |   bfd_vma VirtualAddress;
 | 
      
        | Line 183... | Line 194... | 
      
        |      1 - NATIVE   Doesn't require a subsystem
 |      1 - NATIVE   Doesn't require a subsystem
 | 
      
        |      2 - WINDOWS_GUI runs in Windows GUI subsystem
 |      2 - WINDOWS_GUI runs in Windows GUI subsystem
 | 
      
        |      3 - WINDOWS_CUI runs in Windows char sub. (console app)
 |      3 - WINDOWS_CUI runs in Windows char sub. (console app)
 | 
      
        |      5 - OS2_CUI runs in OS/2 character subsystem
 |      5 - OS2_CUI runs in OS/2 character subsystem
 | 
      
        |      7 - POSIX_CUI runs in Posix character subsystem */
 |      7 - POSIX_CUI runs in Posix character subsystem */
 | 
      
        |   short   DllCharacteristics;   /* flags for DLL init, use 0 */
 |   unsigned short DllCharacteristics; /* flags for DLL init  */
 | 
      
        |   bfd_vma SizeOfStackReserve;   /* amount of memory to reserve  */
 |   bfd_vma SizeOfStackReserve;   /* amount of memory to reserve  */
 | 
      
        |   bfd_vma SizeOfStackCommit;    /* amount of memory initially committed for
 |   bfd_vma SizeOfStackCommit;    /* amount of memory initially committed for
 | 
      
        |                                    initial thread's stack, default is 0x1000 */
 |                                    initial thread's stack, default is 0x1000 */
 | 
      
        |   bfd_vma SizeOfHeapReserve;    /* amount of virtual memory to reserve and */
 |   bfd_vma SizeOfHeapReserve;    /* amount of virtual memory to reserve and */
 | 
      
        |   bfd_vma SizeOfHeapCommit;     /* commit, don't know what to defaut it to */
 |   bfd_vma SizeOfHeapCommit;     /* commit, don't know what to defaut it to */
 | 
      
        | Line 271... | Line 282... | 
      
        | #define C_EOS           102     /* end of structure             */
 | #define C_EOS           102     /* end of structure             */
 | 
      
        | #define C_FILE          103     /* file name                    */
 | #define C_FILE          103     /* file name                    */
 | 
      
        | #define C_LINE          104     /* line # reformatted as symbol table entry */
 | #define C_LINE          104     /* line # reformatted as symbol table entry */
 | 
      
        | #define C_ALIAS         105     /* duplicate tag                */
 | #define C_ALIAS         105     /* duplicate tag                */
 | 
      
        | #define C_HIDDEN        106     /* ext symbol in dmert public lib */
 | #define C_HIDDEN        106     /* ext symbol in dmert public lib */
 | 
      
        |  
 |   | 
      
        | #if defined _AIX52 || defined AIX_WEAK_SUPPORT
 |   | 
      
        | #define C_WEAKEXT       111     /* weak symbol -- AIX standard.  */
 |   | 
      
        | #else
 |   | 
      
        | #define C_WEAKEXT       127     /* weak symbol -- GNU extension.  */
 | #define C_WEAKEXT       127     /* weak symbol -- GNU extension.  */
 | 
      
        | #endif
 |   | 
      
        |  
 |  
 | 
      
        | /* New storage classes for TI COFF */
 | /* New storage classes for TI COFF */
 | 
      
        | #define C_UEXT          19      /* Tentative external definition */
 | #define C_UEXT          19      /* Tentative external definition */
 | 
      
        | #define C_STATLAB       20      /* Static load time label */
 | #define C_STATLAB       20      /* Static load time label */
 | 
      
        | #define C_EXTLAB        21      /* External load time label */
 | #define C_EXTLAB        21      /* External load time label */
 | 
      
        | Line 309... | Line 315... | 
      
        |  
 |  
 | 
      
        |  /* New storage classes for RS/6000 */
 |  /* New storage classes for RS/6000 */
 | 
      
        | #define C_HIDEXT        107     /* Un-named external symbol */
 | #define C_HIDEXT        107     /* Un-named external symbol */
 | 
      
        | #define C_BINCL         108     /* Marks beginning of include file */
 | #define C_BINCL         108     /* Marks beginning of include file */
 | 
      
        | #define C_EINCL         109     /* Marks ending of include file */
 | #define C_EINCL         109     /* Marks ending of include file */
 | 
      
        |   | #define C_AIX_WEAKEXT   111     /* AIX definition of C_WEAKEXT.  */
 | 
      
        |   |  
 | 
      
        |   | #if defined _AIX52 || defined AIX_WEAK_SUPPORT
 | 
      
        |   | #undef C_WEAKEXT
 | 
      
        |   | #define C_WEAKEXT       C_AIX_WEAKEXT
 | 
      
        |   | #endif
 | 
      
        |  
 |  
 | 
      
        |  /* storage classes for stab symbols for RS/6000 */
 |  /* storage classes for stab symbols for RS/6000 */
 | 
      
        | #define C_GSYM          (0x80)
 | #define C_GSYM          (0x80)
 | 
      
        | #define C_LSYM          (0x81)
 | #define C_LSYM          (0x81)
 | 
      
        | #define C_PSYM          (0x82)
 | #define C_PSYM          (0x82)
 | 
      
        | Line 334... | Line 346... | 
      
        | #define C_THUMBSTAT     (128 + C_STAT)          /* 131 */
 | #define C_THUMBSTAT     (128 + C_STAT)          /* 131 */
 | 
      
        | #define C_THUMBLABEL    (128 + C_LABEL)         /* 134 */
 | #define C_THUMBLABEL    (128 + C_LABEL)         /* 134 */
 | 
      
        | #define C_THUMBEXTFUNC  (C_THUMBEXT  + 20)      /* 150 */
 | #define C_THUMBEXTFUNC  (C_THUMBEXT  + 20)      /* 150 */
 | 
      
        | #define C_THUMBSTATFUNC (C_THUMBSTAT + 20)      /* 151 */
 | #define C_THUMBSTATFUNC (C_THUMBSTAT + 20)      /* 151 */
 | 
      
        |  
 |  
 | 
      
        |   | /* True if XCOFF symbols of class CLASS have auxillary csect information.  */
 | 
      
        |   | #define CSECT_SYM_P(CLASS) \
 | 
      
        |   |   ((CLASS) == C_EXT || (CLASS) == C_AIX_WEAKEXT || (CLASS) == C_HIDEXT)
 | 
      
        |   |  
 | 
      
        | /********************** SECTION HEADER **********************/
 | /********************** SECTION HEADER **********************/
 | 
      
        |  
 |  
 | 
      
        | #define SCNNMLEN (8)
 | #define SCNNMLEN (8)
 | 
      
        |  
 |  
 | 
      
        | struct internal_scnhdr
 | struct internal_scnhdr
 |