+Fri Jan 28 10:40:34 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * config/pa/tm-hppa.h: Define macro SMASH_TEXT_ADDRESS.
+ * elfread.c (record_minimal_symbol_and_info),
+ dwarfread.c (process_dies), paread.c (pa_symtab_read): Use it.
+
Thu Jan 27 15:12:23 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
* i386-stub.c: Add ".text" right before "mem_fault:".
#define PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) \
sp = hppa_push_arguments(nargs, args, sp, struct_return, struct_addr)
-
-/* Symbol files have two symbol tables. Rather than do this right,
- like the ELF symbol reading code, massive hackery was added
- to dbxread.c and partial-stab.h. This flag turns on that
- hackery, which should all go away FIXME FIXME FIXME FIXME now. */
+\f
+/* The low two bits of the PC on the PA contain the privilege level. Some
+ genius implementing a (non-GCC) compiler apparently decided this means
+ that "addresses" in a text section therefore include a privilege level,
+ and thus symbol tables should contain these bits. This seems like a
+ bonehead thing to do--anyway, it seems to work for our purposes to just
+ ignore those bits. */
+#define SMASH_TEXT_ADDRESS(addr) ((addr) &= ~0x3)
#define GDB_TARGET_IS_HPPA
{
nextdie = thisdie + di.die_length;
}
+#ifdef SMASH_TEXT_ADDRESS
+ /* I think that these are always text, not data, addresses. */
+ SMASH_TEXT_ADDRESS (di.at_low_pc);
+ SMASH_TEXT_ADDRESS (di.at_high_pc);
+#endif
switch (di.die_tag)
{
case TAG_compile_unit:
case mst_text:
case mst_file_text:
section = SECT_OFF_TEXT;
+#ifdef SMASH_TEXT_ADDRESS
+ SMASH_TEXT_ADDRESS (address);
+#endif
break;
case mst_data:
case mst_file_data:
case ST_MILLICODE:
symname = bufp->name.n_strx + stringtab;
ms_type = mst_text;
- bufp->symbol_value &= ~0x3; /* clear out permission bits */
+#ifdef SMASH_TEXT_ADDRESS
+ SMASH_TEXT_ADDRESS (bufp->symbol_value);
+#endif
break;
case ST_DATA:
symname = bufp->name.n_strx + stringtab;
case ST_CODE:
symname = bufp->name.n_strx + stringtab;
ms_type = mst_file_text;
- bufp->symbol_value &= ~0x3; /* clear out permission bits */
+#ifdef SMASH_TEXT_ADDRESS
+ SMASH_TEXT_ADDRESS (bufp->symbol_value);
+#endif
check_strange_names:
/* GAS leaves labels in .o files after assembling. At
case ST_MILLICODE:
symname = bufp->name.n_strx + stringtab;
ms_type = mst_file_text;
- bufp->symbol_value &= ~0x3; /* clear out permission bits */
+#ifdef SMASH_TEXT_ADDRESS
+ SMASH_TEXT_ADDRESS (bufp->symbol_value);
+#endif
break;
case ST_DATA: