* syms.c (_bfd_generic_make_empty_symbol): New function.
[deliverable/binutils-gdb.git] / bfd / syms.c
index 03c41a5286220cb0aa7f0cbb2af8e3d7a9abc3c4..9ec9dd8e769d96659c8c189985aff7b0a1d16f0a 100644 (file)
@@ -494,6 +494,31 @@ DESCRIPTION
 .     BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd))
 */
 
+/*
+FUNCTION
+       _bfd_generic_make_empty_symbol
+
+SYNOPSIS
+       asymbol *_bfd_generic_make_empty_symbol (bfd *);
+
+DESCRIPTION
+       Create a new <<asymbol>> structure for the BFD @var{abfd}
+       and return a pointer to it.  Used by core file routines,
+       binary back-end and anywhere else where no private info
+       is needed.
+*/
+
+asymbol *
+_bfd_generic_make_empty_symbol (abfd)
+     bfd *abfd;
+{
+  bfd_size_type amt = sizeof (asymbol);
+  asymbol *new = (asymbol *) bfd_zalloc (abfd, amt);
+  if (new)
+    new->the_bfd = abfd;
+  return new;
+}
+
 /*
 FUNCTION
        bfd_make_debug_symbol
This page took 0.023373 seconds and 4 git commands to generate.