home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!vnet.ibm.com
- From: russotto@vnet.ibm.com (Matthew T. Russotto)
- Message-ID: <19930107.062513.949@almaden.ibm.com>
- Date: Thu, 7 Jan 93 09:15:52 EST
- Newsgroups: comp.unix.aix
- Subject: Re: static data no in the symbol table?
- Disclaimer: This posting represents the poster's views, not those of IBM
- News-Software: UReply 3.1
- References: <sfGpsXC00WoiFTzn8g@andrew.cmu.edu>
- Lines: 33
-
- In <sfGpsXC00WoiFTzn8g@andrew.cmu.edu> Robert Andrew Ryan writes:
- >It appears that under some circumstances xlc fails to output symbols for
- >static data. For example, compiling:
- >
- >struct classheader {
- > long version;
- > char *name;
- > char *key;
- > char *data;
- >};
- >
- >static struct classheader atom_classheader = {
- > 4,
- > "atom",
- > "atom",
- > 0x92382,
- >};
- >
- >gives:
- >
- >% nm foo.o
- > U ._ptrgl
- >00000000 d TOC
- >00000000 d _foo$c$
- >00000008 d _foo$c$
- >
- >Anyone know if this is a bug or a feature? Any workarounds?
-
- Neither. All the static data for the source file is in those sections
- with the '$' in them. Statics don't get their own symbol entries-- they
- don't need them.
- (BSS data goes in sections with '@' in them)
-
-