obj.h 648 B

12345678910111213141516171819202122232425
  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. uint sig; /* type signature for symbol */
  19. };
  20. #define UNKNOWN '?'
  21. void _offset(int, vlong);