GNU Info

Info Node: (bfd.info)symbol handling functions

(bfd.info)symbol handling functions


Prev: typedef asymbol Up: Symbols
Enter node , (file) or (file)node

Symbol handling functions
-------------------------

`bfd_get_symtab_upper_bound'
............................

   *Description*
Return the number of bytes required to store a vector of pointers to
`asymbols' for all the symbols in the BFD ABFD, including a terminal
NULL pointer. If there are no symbols in the BFD, then return 0.  If an
error occurs, return -1.
     #define bfd_get_symtab_upper_bound(abfd) \
          BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd))

`bfd_is_local_label'
....................

   *Synopsis*
     boolean bfd_is_local_label(bfd *abfd, asymbol *sym);
   *Description*
Return true if the given symbol SYM in the BFD ABFD is a compiler
generated local label, else return false.

`bfd_is_local_label_name'
.........................

   *Synopsis*
     boolean bfd_is_local_label_name(bfd *abfd, const char *name);
   *Description*
Return true if a symbol with the name NAME in the BFD ABFD is a
compiler generated local label, else return false.  This just checks
whether the name has the form of a local label.
     #define bfd_is_local_label_name(abfd, name) \
          BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name))

`bfd_canonicalize_symtab'
.........................

   *Description*
Read the symbols from the BFD ABFD, and fills in the vector LOCATION
with pointers to the symbols and a trailing NULL.  Return the actual
number of symbol pointers, not including the NULL.
     #define bfd_canonicalize_symtab(abfd, location) \
          BFD_SEND (abfd, _bfd_canonicalize_symtab,\
                       (abfd, location))

`bfd_set_symtab'
................

   *Synopsis*
     boolean bfd_set_symtab (bfd *abfd, asymbol **location, unsigned int count);
   *Description*
Arrange that when the output BFD ABFD is closed, the table LOCATION of
COUNT pointers to symbols will be written.

`bfd_print_symbol_vandf'
........................

   *Synopsis*
     void bfd_print_symbol_vandf(bfd *abfd, PTR file, asymbol *symbol);
   *Description*
Print the value and flags of the SYMBOL supplied to the stream FILE.

`bfd_make_empty_symbol'
.......................

   *Description*
Create a new `asymbol' structure for the BFD ABFD and return a pointer
to it.

   This routine is necessary because each back end has private
information surrounding the `asymbol'. Building your own `asymbol' and
pointing to it will not create the private information, and will cause
problems later on.
     #define bfd_make_empty_symbol(abfd) \
          BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd))

`_bfd_generic_make_empty_symbol'
................................

   *Synopsis*
     asymbol *_bfd_generic_make_empty_symbol (bfd *);
   *Description*
Create a new `asymbol' structure for the BFD ABFD and return a pointer
to it.  Used by core file routines, binary back-end and anywhere else
where no private info is needed.

`bfd_make_debug_symbol'
.......................

   *Description*
Create a new `asymbol' structure for the BFD ABFD, to be used as a
debugging symbol.  Further details of its use have yet to be worked out.
     #define bfd_make_debug_symbol(abfd,ptr,size) \
             BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size))

`bfd_decode_symclass'
.....................

   *Description*
Return a character corresponding to the symbol class of SYMBOL, or '?'
for an unknown class.

   *Synopsis*
     int bfd_decode_symclass(asymbol *symbol);

`bfd_is_undefined_symclass'
...........................

   *Description*
Returns non-zero if the class symbol returned by bfd_decode_symclass
represents an undefined symbol.  Returns zero otherwise.

   *Synopsis*
     boolean bfd_is_undefined_symclass (int symclass);

`bfd_symbol_info'
.................

   *Description*
Fill in the basic info about symbol that nm needs.  Additional info may
be added by the back-ends after calling this function.

   *Synopsis*
     void bfd_symbol_info(asymbol *symbol, symbol_info *ret);

`bfd_copy_private_symbol_data'
..............................

   *Synopsis*
     boolean bfd_copy_private_symbol_data(bfd *ibfd, asymbol *isym, bfd *obfd, asymbol *osym);
   *Description*
Copy private symbol information from ISYM in the BFD IBFD to the symbol
OSYM in the BFD OBFD.  Return `true' on success, `false' on error.
Possible error returns are:

   * `bfd_error_no_memory' - Not enough memory exists to create private
     data for OSEC.

     #define bfd_copy_private_symbol_data(ibfd, isymbol, obfd, osymbol) \
          BFD_SEND (obfd, _bfd_copy_private_symbol_data, \
                    (ibfd, isymbol, obfd, osymbol))


automatically generated by info2www version 1.2.2.9