obj.h 604 B

123456789101112131415161718192021222324
  1. /*
  2. * obj.h -- defs for dealing with object files
  3. */
  4. typedef enum Kind /* variable defs and references in obj */
  5. {
  6. aNone, /* we don't care about this prog */
  7. aName, /* introduces a name */
  8. aText, /* starts a function */
  9. aData, /* references to a global object */
  10. } Kind;
  11. typedef struct Prog Prog;
  12. struct Prog /* info from .$O files */
  13. {
  14. Kind kind; /* what kind of symbol */
  15. char type; /* type of the symbol: ie, 'T', 'a', etc. */
  16. char sym; /* index of symbol's name */
  17. char *id; /* name for the symbol, if it introduces one */
  18. };
  19. #define UNKNOWN '?'
  20. void _offset(int, vlong);