home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / unix / aix / 13089 < prev    next >
Encoding:
Internet Message Format  |  1993-01-07  |  1.1 KB

  1. Path: sparky!uunet!vnet.ibm.com
  2. From: russotto@vnet.ibm.com (Matthew T. Russotto)
  3. Message-ID: <19930107.062513.949@almaden.ibm.com>
  4. Date: Thu, 7 Jan 93 09:15:52 EST
  5. Newsgroups: comp.unix.aix
  6. Subject: Re: static data no in the symbol table?
  7. Disclaimer: This posting represents the poster's views, not those of IBM
  8. News-Software: UReply 3.1
  9. References: <sfGpsXC00WoiFTzn8g@andrew.cmu.edu>
  10. Lines: 33
  11.  
  12. In <sfGpsXC00WoiFTzn8g@andrew.cmu.edu> Robert Andrew Ryan writes:
  13. >It appears that under some circumstances xlc fails to output symbols for
  14. >static data.  For example, compiling:
  15. >
  16. >struct classheader {
  17. >    long version;
  18. >    char *name;
  19. >    char *key;
  20. >    char *data;
  21. >};
  22. >
  23. >static struct classheader atom_classheader = {
  24. >    4,
  25. >    "atom",
  26. >    "atom",
  27. >    0x92382,
  28. >};
  29. >
  30. >gives:
  31. >
  32. >% nm foo.o
  33. >         U ._ptrgl
  34. >00000000 d TOC
  35. >00000000 d _foo$c$
  36. >00000008 d _foo$c$
  37. >
  38. >Anyone know if this is a bug or a feature?  Any workarounds?
  39.  
  40. Neither.  All the static data for the source file is in those sections
  41. with the '$' in them.  Statics don't get their own symbol entries-- they
  42. don't need them.
  43. (BSS data goes in sections with '@' in them)
  44.  
  45.