- obj_symbol_type sy_symbol; /* what we write in .o file (if permitted) */
- unsigned long sy_name_offset; /* 4-origin position of sy_name in symbols */
- /* part of object file. */
- /* 0 for (nameless) .stabd symbols. */
- /* Not used until write_object_file() time. */
- long sy_number; /* 24 bit symbol number. */
- /* Symbol numbers start at 0 and are */
- /* unsigned. */
- struct symbol *sy_next; /* forward chain, or NULL */
-#ifdef SYMBOLS_NEED_BACKPOINTERS
- struct symbol *sy_previous; /* backward chain, or NULL */
-#endif /* SYMBOLS_NEED_BACKPOINTERS */
- struct frag *sy_frag; /* NULL or -> frag this symbol attaches to. */
- struct symbol *sy_forward; /* value is really that of this other symbol */
- /* We will probably want to add a sy_segment here soon. */
+ /* Wether the symbol is a local_symbol. */
+ unsigned int sy_local_symbol : 1;
+
+ /* Wether symbol has been written. */
+ unsigned int sy_written : 1;
+
+ /* Whether symbol value has been completely resolved (used during
+ final pass over symbol table). */
+ unsigned int sy_resolved : 1;
+
+ /* Whether the symbol value is currently being resolved (used to
+ detect loops in symbol dependencies). */
+ unsigned int sy_resolving : 1;
+
+ /* 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
+ are local and would otherwise not be. */
+ unsigned int sy_used_in_reloc : 1;
+
+ /* Whether the symbol is used as an operand or in an expression.
+ NOTE: Not all the backends keep this information accurate;
+ backends which use this bit are responsible for setting it when
+ a symbol is used in backend routines. */
+ unsigned int sy_used : 1;
+
+ /* Whether the symbol can be re-defined. */
+ unsigned int sy_volatile : 1;
+
+ /* Whether the symbol is a forward reference. */
+ unsigned int sy_forward_ref : 1;
+
+ /* This is set if the symbol is defined in an MRI common section.
+ We handle such sections as single common symbols, so symbols
+ defined within them must be treated specially by the relocation
+ routines. */
+ unsigned int sy_mri_common : 1;
+
+ /* This is set if the symbol is set with a .weakref directive. */
+ unsigned int sy_weakrefr : 1;
+
+ /* 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
+ before. It is cleared as soon as any direct reference to the
+ symbol is present. */
+ unsigned int sy_weakrefd : 1;