struc-symbol.h 2.6 KB

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