* bfd-in.h: Add extern "C" if __cplusplus.
authorIan Lance Taylor <ian@airs.com>
Thu, 31 Aug 1995 16:23:02 +0000 (16:23 +0000)
committerIan Lance Taylor <ian@airs.com>
Thu, 31 Aug 1995 16:23:02 +0000 (16:23 +0000)
* bfd-in2.h: Rebuild.
PR 7882.

bfd/ChangeLog
bfd/bfd-in.h
bfd/bfd-in2.h

index f850718..d1a799f 100644 (file)
@@ -1,5 +1,8 @@
 Thu Aug 31 11:49:21 1995  Ian Lance Taylor  <ian@cygnus.com>
 
+       * bfd-in.h: Add extern "C" if __cplusplus.
+       * bfd-in2.h: Rebuild.
+
        * coff-mips.c (mips_relocate_section): Don't convert a reloc
        against an absolute symbol into a reloc against a section.
 
index 1582482..f4caaab 100644 (file)
@@ -20,7 +20,7 @@ GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 /* bfd.h -- The only header file required by users of the bfd library 
 
@@ -44,6 +44,10 @@ here.  */
 #ifndef __BFD_H_SEEN__
 #define __BFD_H_SEEN__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #include "ansidecl.h"
 #include "obstack.h"
 
@@ -458,32 +462,45 @@ extern int bfd_stat PARAMS ((bfd *abfd, struct stat *));
 /* These are the different types of subsystems to be used when linking for
    Windows NT.  This information is passed in as an input parameter (default
    is console) and ultimately ends up in the optional header data */
-enum bfd_link_subsystem
-{
-  native,    /* image doesn't require a subsystem */
-  windows,   /* image runs in the Windows GUI subsystem */
-  console,   /* image runs in the Windows CUI (character) subsystem */
-  os2,       /* image runs in the OS/2 character subsystem */
-  posix      /* image runs in the posix character subsystem */
-};
+
+#define BFD_PE_NATIVE  1       /* image doesn't require a subsystem */
+#define BFD_PE_WINDOWS 2       /* image runs in the Windows GUI subsystem */
+#define BFD_PE_CONSOLE 3       /* image runs in the Windows CUI subsystem */
+#define BFD_PE_OS2     5       /* image runs in the OS/2 character subsystem */
+#define BFD_PE_POSIX   7       /* image runs in the posix character subsystem */
+
 /* The NT optional header file allows input of the stack and heap reserve
    and commit size.  This data may be input on the command line and will
    end up in the optional header.  Default sizes are provided. */
-struct _bfd_link_stack_heap
+
+typedef struct 
 {
-  boolean stack_defined;
-  boolean heap_defined;
-  bfd_vma stack_reserve;
-  bfd_vma stack_commit;
-  bfd_vma heap_reserve;
-  bfd_vma heap_commit; 
-};
-typedef struct _bfd_link_stack_heap bfd_link_stack_heap;
+  boolean defined;
+  bfd_vma value;
+} bfd_link_pe_info_dval ;
+
+typedef struct _bfd_link_pe_info
+{
+  bfd_link_pe_info_dval dll;
+  bfd_link_pe_info_dval file_alignment;
+  bfd_link_pe_info_dval heap_commit;
+  bfd_link_pe_info_dval heap_reserve;
+  bfd_link_pe_info_dval image_base;
+  bfd_link_pe_info_dval major_image_version;
+  bfd_link_pe_info_dval major_os_version;
+  bfd_link_pe_info_dval major_subsystem_version;
+  bfd_link_pe_info_dval minor_image_version;
+  bfd_link_pe_info_dval minor_os_version;
+  bfd_link_pe_info_dval minor_subsystem_version;
+  bfd_link_pe_info_dval section_alignment;
+  bfd_link_pe_info_dval stack_commit;
+  bfd_link_pe_info_dval stack_reserve;
+  bfd_link_pe_info_dval subsystem;
+}  bfd_link_pe_info;
 
 /* END OF PE STUFF */
 
-extern enum bfd_link_subsystem NT_subsystem;
-extern bfd_link_stack_heap NT_stack_heap;
+
 
 /* Cast from const char * to char * so that caller can assign to
    a char * without a warning.  */
index c04bd4d..9be3a4f 100644 (file)
@@ -44,6 +44,10 @@ here.  */
 #ifndef __BFD_H_SEEN__
 #define __BFD_H_SEEN__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #include "ansidecl.h"
 #include "obstack.h"
 
@@ -497,7 +501,6 @@ typedef struct _bfd_link_pe_info
 /* END OF PE STUFF */
 
 
-extern bfd_link_pe_info pe_info;
 
 /* Cast from const char * to char * so that caller can assign to
    a char * without a warning.  */
@@ -1419,6 +1422,7 @@ The 24-bit relocation is used in some Intel 960 configurations. */
   BFD_RELOC_32_BASEREL,
   BFD_RELOC_16_BASEREL,
   BFD_RELOC_8_BASEREL,
+  BFD_RELOC_RVA,
 
 /* Absolute 8-bit relocation, but used to form an address like 0xFFnn. */
   BFD_RELOC_8_FFnn,
@@ -1629,7 +1633,6 @@ stored in the instruction.  The high 24 bits are installed in bits 23
 through 0. */
   BFD_RELOC_ARC_B26,
 /* end-sanitize-arc */
-
   BFD_RELOC_UNUSED };
 typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
 reloc_howto_type *
@@ -2399,4 +2402,7 @@ bfd_set_format PARAMS ((bfd *abfd, bfd_format format));
 CONST char *
 bfd_format_string PARAMS ((bfd_format format));
 
+#ifdef __cplusplus
+}
+#endif
 #endif