+Thu Feb 11 00:59:07 1993 John Gilmore (gnu@cygnus.com)
+
+ * xcoffread.c (parmsym): Don't use an initializer to set up
+ this struct symbol. Set it up in initialize_xcoffread.
+ (read_xcoff_symtab, xcoff_symfile_read): Surround code that only
+ works on real rs/6000 target with #ifndef FAKING_RS6000.
+
Wed Feb 10 23:42:37 1993 John Gilmore (gnu@cygnus.com)
* stabsread.c (rs6000_builtin_type): Move function from
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
/* Native only: Need struct tbtable in <sys/debug.h> from host, and
- need xcoff_add_toc_to_loadinfo in rs6000-tdep.c from target. */
+ need xcoff_add_toc_to_loadinfo in rs6000-tdep.c from target.
+ need xcoff_init_loadinfo ditto.
+ However, if you grab <sys/debug.h> and make it available on your
+ host, and define FAKING_RS6000, then this code will compile. */
#include "defs.h"
#include "bfd.h"
}
-/* A parameter template, used by ADD_PARM_TO_PENDING. */
+/* A parameter template, used by ADD_PARM_TO_PENDING. It is initialized
+ in our initializer function at the bottom of the file, to avoid
+ dependencies on the exact "struct symbol" format. */
-static struct symbol parmsym = { /* default parameter symbol */
- "", /* name */
- VAR_NAMESPACE, /* namespace */
- LOC_ARG, /* class */
- NULL, /* type */
- 0, /* line number */
- 0, /* value */
-};
+static struct symbol parmsym;
/* Add a parameter to a given pending symbol list. */
If no XMC_TC0 is found, toc_offset should be zero. Another place to obtain
this information would be file auxiliary header. */
+#ifndef FAKING_RS6000
xcoff_add_toc_to_loadinfo (toc_offset);
+#endif
}
#define SYMBOL_DUP(SYMBOL1, SYMBOL2) \
init_minimal_symbol_collection ();
make_cleanup (discard_minimal_symbols, 0);
+#ifndef FAKING_RS6000
/* Initialize load info structure. */
if (mainline)
xcoff_init_loadinfo ();
+#endif
/* Now that the executable file is positioned at symbol table,
process it and define symbols accordingly. */
_initialize_xcoffread ()
{
add_symtab_fns(&xcoff_sym_fns);
+
+ /* Initialize symbol template later used for arguments. */
+ SYMBOL_NAME (&parmsym) = "";
+ SYMBOL_INIT_LANGUAGE_SPECIFIC (&parmsym, language_c);
+ SYMBOL_NAMESPACE (&parmsym) = VAR_NAMESPACE;
+ SYMBOL_CLASS (&parmsym) = LOC_ARG;
+ /* Its other fields are zero, or are filled in later. */
}