obj.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * This file is part of the UCB release of Plan 9. It is subject to the license
  3. * terms in the LICENSE file found in the top-level directory of this
  4. * distribution and at http://akaros.cs.berkeley.edu/files/Plan9License. No
  5. * part of the UCB release of Plan 9, including this file, may be copied,
  6. * modified, propagated, or distributed except according to the terms contained
  7. * in the LICENSE file.
  8. */
  9. /*
  10. * obj.h -- defs for dealing with object files
  11. */
  12. typedef enum Kind /* variable defs and references in obj */
  13. {
  14. aNone, /* we don't care about this prog */
  15. aName, /* introduces a name */
  16. aText, /* starts a function */
  17. aData, /* references to a global object */
  18. } Kind;
  19. typedef struct Prog Prog;
  20. struct Prog /* info from .$O files */
  21. {
  22. Kind kind; /* what kind of symbol */
  23. char type; /* type of the symbol: ie, 'T', 'a', etc. */
  24. char sym; /* index of symbol's name */
  25. char *id; /* name for the symbol, if it introduces one */
  26. uint sig; /* type signature for symbol */
  27. };
  28. #define UNKNOWN '?'
  29. void _offset(int, int64_t);