* Makefile.am: Rename .dep* files to DEP*. Change DEP variable to
[deliverable/binutils-gdb.git] / gas / subsegs.h
index 0b65c0f9d53fcc71d421e29f6f819d5bcf7052d8..4840d5b5c2b775532ce6f29e3b7c7c4e1410784f 100644 (file)
@@ -1,6 +1,5 @@
 /* subsegs.h -> subsegs.c
-
-   Copyright (C) 1987, 1992 Free Software Foundation, Inc.
+   Copyright (C) 1987, 92, 93, 94, 95, 96, 1998 Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
 
@@ -15,8 +14,9 @@
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with GAS; see the file COPYING.  If not, write to
-   the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
+   along with GAS; see the file COPYING.  If not, write to the Free
+   Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+   02111-1307, USA.  */
 
 /*
  * For every sub-segment the user mentions in the ASsembler program,
@@ -37,6 +37,8 @@
  * represent code fragments, for that sub-segment, forward chained.
  */
 
+#include "obstack.h"
+
 struct frchain                 /* control building of a frag chain */
 {                              /* FRCH = FRagment CHain control */
   struct frag *frch_root;      /* 1st struct frag in chain, or NULL */
@@ -44,6 +46,12 @@ struct frchain                       /* control building of a frag chain */
   struct frchain *frch_next;   /* next in chain of struct frchain-s */
   segT frch_seg;               /* SEG_TEXT or SEG_DATA. */
   subsegT frch_subseg;         /* subsegment number of this chain */
+#ifdef BFD_ASSEMBLER
+  fixS *fix_root;              /* Root of fixups for this subsegment.  */
+  fixS *fix_tail;              /* Last fixup for this subsegment.  */
+#endif
+  struct obstack frch_obstack; /* for objects in this frag chain */
+  fragS *frch_frag_now;                /* frag_now for this subsegment */
 };
 
 typedef struct frchain frchainS;
@@ -51,29 +59,36 @@ typedef struct frchain frchainS;
 /* All subsegments' chains hang off here.  NULL means no frchains yet.  */
 extern frchainS *frchain_root;
 
-/* Frchain we are assembling into now That is, the current segment's
+/* Frchain we are assembling into now That is, the current segment's
    frag chain, even if it contains no (complete) frags. */
 extern frchainS *frchain_now;
 
 
-typedef struct
+typedef struct segment_info_struct
 {
   frchainS *frchainP;
-  int hadone : 1;
+  unsigned int hadone : 1;
 
   /* This field is set if this is a .bss section which does not really
      have any contents.  Once upon a time a .bss section did not have
      any frags, but that is no longer true.  This field prevent the
      SEC_HAS_CONTENTS flag from being set for the section even if
      there are frags.  */
-  int bss : 1;
+  unsigned int bss : 1;
 
   int user_stuff;
+
+  /* Fixups for this segment.  If BFD_ASSEMBLER, this is only valid
+     after the frchains are run together.  */
   fixS *fix_root;
   fixS *fix_tail;
+
 #if defined (MANY_SEGMENTS) && !defined (BFD_ASSEMBLER)
   struct internal_scnhdr scnhdr;
+  enum linkonce_type linkonce;
+  const char *name;
 #endif
+
   symbolS *dot;
 
   struct lineno_list *lineno_list_head;
@@ -100,12 +115,15 @@ typedef struct
 #ifdef NEED_LITERAL_POOL
   unsigned long literal_pool_size;
 #endif
+
+#ifdef TC_SEGMENT_INFO_TYPE
+  TC_SEGMENT_INFO_TYPE tc_segment_info_data;
+#endif
 } segment_info_type;
 
 #ifdef BFD_ASSEMBLER
 
-#define seg_info(SEC)  \
-       ((segment_info_type *) bfd_get_section_userdata (stdoutput, (SEC)))
+extern segment_info_type *seg_info PARAMS ((segT));
 extern symbolS *section_symbol PARAMS ((segT));
 
 #else /* ! BFD_ASSEMBLER */
@@ -123,8 +141,19 @@ extern segment_info_type segment_info[];
 extern frchainS *data0_frchainP;
 extern frchainS *bss0_frchainP;
 
+/* Dummy so stuff can compile.  Should never be used.  */
+struct seg_info_trash {
+  struct {
+    unsigned stab_string_size : 1;
+  } stabu;
+  unsigned hadone : 1;
+};
+#define seg_info(S)    (abort (), (struct seg_info_trash *) 0)
+
 #endif
 
 #endif /* ! BFD_ASSEMBLER */
 
+extern void subsegs_print_statistics PARAMS ((FILE *));
+
 /* end of subsegs.h */
This page took 0.023602 seconds and 4 git commands to generate.