]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gas/frags.c
Add support to the Xtensa target for creating trampolines for out-of-range branches.
[thirdparty/binutils-gdb.git] / gas / frags.c
index 5f68480e512c6335ca1e2c14c06e8cc33b6583e2..e14099dda45c49ab2bcb192d224e355acb677b63 100644 (file)
 
 extern fragS zero_address_frag;
 extern fragS predefined_address_frag;
+
+static int totalfrags;
+
+int
+get_frag_count (void)
+{
+  return totalfrags;
+}
+
+void
+clear_frag_count (void)
+{
+  totalfrags = 0;
+}
 \f
 /* Initialization for frag routines.  */
 
@@ -70,6 +84,7 @@ frag_alloc (struct obstack *ob)
   ptr = (fragS *) obstack_alloc (ob, SIZEOF_STRUCT_FRAG);
   obstack_alignment_mask (ob) = oalign;
   memset (ptr, 0, SIZEOF_STRUCT_FRAG);
+  totalfrags++;
   return ptr;
 }
 \f