OpenCores
URL https://opencores.org/ocsvn/open8_urisc/open8_urisc/trunk

Subversion Repositories open8_urisc

[/] [open8_urisc/] [trunk/] [gnu/] [binutils/] [gas/] [struc-symbol.h] - Diff between revs 147 and 166

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 147 Rev 166
Line 20... Line 20...
   02110-1301, USA.  */
   02110-1301, USA.  */
 
 
#ifndef __struc_symbol_h__
#ifndef __struc_symbol_h__
#define __struc_symbol_h__
#define __struc_symbol_h__
 
 
/* The information we keep for a symbol.  Note that the symbol table
struct symbol_flags
   holds pointers both to this and to local_symbol structures.  See
 
   below.  */
 
 
 
struct symbol
 
{
{
  /* BFD symbol */
  /* Wether the symbol is a local_symbol.  */
  asymbol *bsym;
  unsigned int sy_local_symbol : 1;
 
 
  /* The value of the symbol.  */
  /* Wether symbol has been written.  */
  expressionS sy_value;
  unsigned int sy_written : 1;
 
 
  /* Forwards and (optionally) backwards chain pointers.  */
 
  struct symbol *sy_next;
 
  struct symbol *sy_previous;
 
 
 
  /* Pointer to the frag this symbol is attached to, if any.
 
     Otherwise, NULL.  */
 
  struct frag *sy_frag;
 
 
 
  unsigned int written : 1;
 
  /* Whether symbol value has been completely resolved (used during
  /* Whether symbol value has been completely resolved (used during
     final pass over symbol table).  */
     final pass over symbol table).  */
  unsigned int sy_resolved : 1;
  unsigned int sy_resolved : 1;
 
 
  /* Whether the symbol value is currently being resolved (used to
  /* Whether the symbol value is currently being resolved (used to
     detect loops in symbol dependencies).  */
     detect loops in symbol dependencies).  */
  unsigned int sy_resolving : 1;
  unsigned int sy_resolving : 1;
 
 
  /* Whether the symbol value is used in a reloc.  This is used to
  /* Whether the symbol value is used in a reloc.  This is used to
     ensure that symbols used in relocs are written out, even if they
     ensure that symbols used in relocs are written out, even if they
     are local and would otherwise not be.  */
     are local and would otherwise not be.  */
  unsigned int sy_used_in_reloc : 1;
  unsigned int sy_used_in_reloc : 1;
 
 
Line 78... Line 67...
  /* This is set when the symbol is referenced as part of a .weakref
  /* This is set when the symbol is referenced as part of a .weakref
     directive, but only if the symbol was not in the symbol table
     directive, but only if the symbol was not in the symbol table
     before.  It is cleared as soon as any direct reference to the
     before.  It is cleared as soon as any direct reference to the
     symbol is present.  */
     symbol is present.  */
  unsigned int sy_weakrefd : 1;
  unsigned int sy_weakrefd : 1;
 
};
 
 
 
/* The information we keep for a symbol.  Note that the symbol table
 
   holds pointers both to this and to local_symbol structures.  See
 
   below.  */
 
 
 
struct symbol
 
{
 
  /* Symbol flags.  */
 
  struct symbol_flags sy_flags;
 
 
 
  /* BFD symbol */
 
  asymbol *bsym;
 
 
 
  /* The value of the symbol.  */
 
  expressionS sy_value;
 
 
 
  /* Forwards and (optionally) backwards chain pointers.  */
 
  struct symbol *sy_next;
 
  struct symbol *sy_previous;
 
 
 
  /* Pointer to the frag this symbol is attached to, if any.
 
     Otherwise, NULL.  */
 
  struct frag *sy_frag;
 
 
#ifdef OBJ_SYMFIELD_TYPE
#ifdef OBJ_SYMFIELD_TYPE
  OBJ_SYMFIELD_TYPE sy_obj;
  OBJ_SYMFIELD_TYPE sy_obj;
#endif
#endif
 
 
Line 105... Line 118...
   big difference in assembler memory usage when assembling a large
   big difference in assembler memory usage when assembling a large
   file.  */
   file.  */
 
 
struct local_symbol
struct local_symbol
{
{
  /* This pointer is always NULL to indicate that this is a local
  /* Symbol flags.  Only sy_local_symbol and sy_resolved are relevant.  */
     symbol.  */
  struct symbol_flags lsy_flags;
  asymbol *lsy_marker;
 
 
 
  /* The symbol section.  This also serves as a flag.  If this is
  /* The symbol section.  This also serves as a flag.  If this is
     reg_section, then this symbol has been converted into a regular
     reg_section, then this symbol has been converted into a regular
     symbol, and lsy_sym points to it.  */
     symbol, and lsy_sym points to it.  */
  segT lsy_section;
  segT lsy_section;
 
 
  /* The symbol name.  */
  /* The symbol name.  */
  const char *lsy_name;
  const char *lsy_name;
 
 
  /* The symbol frag or the real symbol, depending upon the value in
  /* The symbol frag or the real symbol, depending upon the value in
     lsy_section.  If the symbol has been fully resolved, lsy_frag is
     lsy_section.  */
     set to NULL.  */
 
  union
  union
  {
  {
    fragS *lsy_frag;
    fragS *lsy_frag;
    symbolS *lsy_sym;
    symbolS *lsy_sym;
  } u;
  } u;
Line 136... Line 147...
#endif
#endif
};
};
 
 
#define local_symbol_converted_p(l) ((l)->lsy_section == reg_section)
#define local_symbol_converted_p(l) ((l)->lsy_section == reg_section)
#define local_symbol_mark_converted(l) ((l)->lsy_section = reg_section)
#define local_symbol_mark_converted(l) ((l)->lsy_section = reg_section)
#define local_symbol_resolved_p(l) ((l)->u.lsy_frag == NULL)
#define local_symbol_resolved_p(l) ((l)->lsy_flags.sy_resolved)
#define local_symbol_mark_resolved(l) ((l)->u.lsy_frag = NULL)
#define local_symbol_mark_resolved(l) ((l)->lsy_flags.sy_resolved = 1)
#define local_symbol_get_frag(l) ((l)->u.lsy_frag)
#define local_symbol_get_frag(l) ((l)->u.lsy_frag)
#define local_symbol_set_frag(l, f) ((l)->u.lsy_frag = (f))
#define local_symbol_set_frag(l, f) ((l)->u.lsy_frag = (f))
#define local_symbol_get_real_symbol(l) ((l)->u.lsy_sym)
#define local_symbol_get_real_symbol(l) ((l)->u.lsy_sym)
#define local_symbol_set_real_symbol(l, s) ((l)->u.lsy_sym = (s))
#define local_symbol_set_real_symbol(l, s) ((l)->u.lsy_sym = (s))
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.