Sun Feb 27 15:22:36 1994 Stan Shebs (shebs@andros.cygnus.com)
[deliverable/binutils-gdb.git] / bfd / bfd-in2.h
index eb942dc468b3a4aabee588eed356cf2f0443e16d..294b0a9492b55655ed4a017e9f888232e55e1357 100644 (file)
@@ -756,6 +756,12 @@ typedef struct sec
            discarded. */
 #define SEC_DEBUGGING 0x10000
 
+         /* The contents of this section are held in memory pointed to
+           by the contents field.  This is checked by
+           bfd_get_section_contents, and the data is retrieved from
+           memory if appropriate.  */
+#define SEC_IN_MEMORY 0x20000
+
         /*  End of section flags.  */
 
         /*  The virtual memory address of the section - where it will be
@@ -835,7 +841,9 @@ typedef struct sec
 
    PTR userdata;
 
-   struct lang_output_section *otheruserdata;
+         /* If the SEC_IN_MEMORY flag is set, this points to the actual
+           contents.  */
+   unsigned char *contents;
 
          /* Attached line number information */
 
@@ -975,6 +983,7 @@ enum bfd_architecture
   bfd_arch_h8300,      /* Hitachi H8/300 */
 #define bfd_mach_h8300   1
 #define bfd_mach_h8300h  2
+  bfd_arch_powerpc,    /* PowerPC */
   bfd_arch_rs6000,     /* IBM RS/6000 */
   bfd_arch_hppa,       /* HP PA RISC */
   bfd_arch_z8k,        /* Zilog Z8000 */
@@ -1494,6 +1503,15 @@ typedef enum bfd_reloc_code_real
   BFD_RELOC_386_GOTOFF,
   BFD_RELOC_386_GOTPC,
 
+   /* PowerPC/POWER (RS/6000) relocs.  */
+   /* 26 bit relative branch.  Low two bits must be zero.  High 24
+     bits installed in bits 6 through 29 of instruction.  */
+  BFD_RELOC_PPC_B26,
+   /* 26 bit absolute branch, like BFD_RELOC_PPC_B26 but absolute.  */
+  BFD_RELOC_PPC_BA26,
+   /* 16 bit TOC relative reference.  */
+  BFD_RELOC_PPC_TOC16,
+
    /* this must be the highest numeric value */
   BFD_RELOC_UNUSED
  } bfd_reloc_code_real_type;
@@ -1782,29 +1800,33 @@ struct _bfd
 
 typedef enum bfd_error
 {
-  no_error = 0,
-  system_call_error,
-  invalid_target,
-  wrong_format,
-  invalid_operation,
-  no_memory,
-  no_symbols,
-  no_more_archived_files,
-  malformed_archive,
-  file_not_recognized,
-  file_ambiguously_recognized,
-  no_contents,
-  nonrepresentable_section,
-  no_debug_section,
-  bad_value,
-  file_truncated,
-  invalid_error_code
-} bfd_ec;
-
-extern bfd_ec bfd_error;
+  bfd_error_no_error = 0,
+  bfd_error_system_call,
+  bfd_error_invalid_target,
+  bfd_error_wrong_format,
+  bfd_error_invalid_operation,
+  bfd_error_no_memory,
+  bfd_error_no_symbols,
+  bfd_error_no_more_archived_files,
+  bfd_error_malformed_archive,
+  bfd_error_file_not_recognized,
+  bfd_error_file_ambiguously_recognized,
+  bfd_error_no_contents,
+  bfd_error_nonrepresentable_section,
+  bfd_error_no_debug_section,
+  bfd_error_bad_value,
+  bfd_error_file_truncated,
+  bfd_error_invalid_error_code
+} bfd_error_type;
+
+bfd_error_type 
+bfd_get_error  PARAMS ((void));
+
+void 
+bfd_set_error  PARAMS ((bfd_error_type error_tag));
 
 CONST char *
-bfd_errmsg  PARAMS ((bfd_ec error_tag));
+bfd_errmsg  PARAMS ((bfd_error_type error_tag));
 
 void 
 bfd_perror  PARAMS ((CONST char *message));
@@ -1910,8 +1932,24 @@ core_file_matches_executable_p
 
 #define BFD_SEND(bfd, message, arglist) \
                ((*((bfd)->xvec->message)) arglist)
+
+#ifdef DEBUG_BFD_SEND
+#undef BFD_SEND
+#define BFD_SEND(bfd, message, arglist) \
+  (((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \
+    ((*((bfd)->xvec->message)) arglist) : \
+    (bfd_assert (__FILE__,__LINE__), NULL))
+#endif
 #define BFD_SEND_FMT(bfd, message, arglist) \
             (((bfd)->xvec->message[(int)((bfd)->format)]) arglist)
+
+#ifdef DEBUG_BFD_SEND
+#undef BFD_SEND_FMT
+#define BFD_SEND_FMT(bfd, message, arglist) \
+  (((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \
+   (((bfd)->xvec->message[(int)((bfd)->format)]) arglist) : \
+   (bfd_assert (__FILE__,__LINE__), NULL))
+#endif
 enum bfd_flavour {
   bfd_target_unknown_flavour,
   bfd_target_aout_flavour,
This page took 0.025904 seconds and 4 git commands to generate.