home *** CD-ROM | disk | FTP | other *** search
/ Dream 52 / Amiga_Dream_52.iso / Atari / Gnu / gassrc04.zoo / struc-symbol.h < prev    next >
C/C++ Source or Header  |  1991-01-24  |  3KB  |  77 lines

  1. /* struct_symbol.h - Internal symbol structure
  2.    Copyright (C) 1987 Free Software Foundation, Inc.
  3.  
  4. This file is part of GAS, the GNU Assembler.
  5.  
  6. GAS is free software; you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation; either version 1, or (at your option)
  9. any later version.
  10.  
  11. GAS is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. GNU General Public License for more details.
  15.  
  16. You should have received a copy of the GNU General Public License
  17. along with GAS; see the file COPYING.  If not, write to
  18. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  19.  
  20. #ifndef        VMS
  21. #  if (atarist || atariminix || CROSSATARI)
  22. #    include <gnu-out.h>
  23. #  else
  24. #    include "a.out.gnu.h"        /* Needed to define struct nlist. Sigh. */
  25. #  endif
  26. #else
  27. #include "a_out.h"
  28. #endif
  29.  
  30. struct symbol            /* our version of an nlist node */
  31. {
  32.   struct nlist    sy_nlist;    /* what we write in .o file (if permitted) */
  33.   long unsigned sy_name_offset;    /* 4-origin position of sy_name in symbols */
  34.                 /* part of object file. */
  35.                 /* 0 for (nameless) .stabd symbols. */
  36.                 /* Not used until write_object_file() time. */
  37.   long int    sy_number;    /* 24 bit symbol number. */
  38.                 /* Symbol numbers start at 0 and are */
  39.                 /* unsigned. */
  40.   struct symbol * sy_next;    /* forward chain, or NULL */
  41.   struct frag *    sy_frag;    /* NULL or -> frag this symbol attaches to. */
  42.   struct symbol *sy_forward;    /* value is really that of this other symbol */
  43. };
  44.  
  45. typedef struct symbol symbolS;
  46.  
  47. #define sy_name        sy_nlist .n_un. n_name
  48.                 /* Name field always points to a string. */
  49.                 /* 0 means .stabd-like anonymous symbol. */
  50. #define sy_type     sy_nlist.    n_type
  51. #define sy_other    sy_nlist.    n_other
  52. #define sy_desc        sy_nlist.    n_desc
  53. #define sy_value    sy_nlist.    n_value
  54.                 /* Value of symbol is this value + object */
  55.                 /* file address of sy_frag. */
  56.  
  57. typedef unsigned valueT;    /* The type of n_value. Helps casting. */
  58.  
  59. /* end: struct_symbol.h */
  60. #ifndef WORKING_DOT_WORD
  61. struct broken_word {
  62.     struct broken_word *next_broken_word;/* One of these strucs per .word x-y */
  63.     fragS    *frag;        /* Which frag its in */
  64.     char    *word_goes_here;/* Where in the frag it is */
  65.     fragS    *dispfrag;    /* where to add the break */
  66.     symbolS    *add;        /* symbol_x */
  67.     symbolS    *sub;        /* - symbol_y */
  68.     long    addnum;        /* + addnum */
  69.     int    added;        /* nasty thing happend yet? */
  70.                 /* 1: added and has a long-jump */
  71.                 /* 2: added but uses someone elses long-jump */
  72.     struct broken_word *use_jump; /* points to broken_word with a similar
  73.                      long-jump */
  74. };
  75. extern struct broken_word *broken_words;
  76. #endif
  77.