Mon Mar 14 11:41:23 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+ * som.c (som_prep_for_fixups): A relocation involving the section
+ symbol for the *ABS* section is really a relocation involving
+ no symbol.
+ (som_slurp_symbol_table): Do not set BSF_GLOBAL or BSF_EXPORT for
+ undefined symbols. Correctly distinguish between debugger symbols
+ and section symbols.
+
* som (setup_sections): Set SEC_DEBUGGING and the section attributes
for spaces and subspaces.
arelent *reloc = section->orelocation[i];
int scale;
- /* If no symbol, then there is no counter to increase. */
- if (reloc->sym_ptr_ptr == NULL)
+ /* A relocation against a symbol in the *ABS* section really
+ does not have a symbol. Likewise if the symbol isn't associated
+ with any section. */
+ if (reloc->sym_ptr_ptr == NULL
+ || (*reloc->sym_ptr_ptr)->section == &bfd_abs_section)
continue;
/* Scaling to encourage symbols involved in R_DP_RELATIVE
/* symbol_info field is undefined for SS_EXTERNAL and SS_UNSAT symbols,
so the section associated with this symbol can't be known. */
case SS_EXTERNAL:
- case SS_UNSAT:
if (bufp->symbol_type != ST_STORAGE)
sym->symbol.section = &bfd_und_section;
else
sym->symbol.flags |= (BSF_EXPORT | BSF_GLOBAL);
break;
+ case SS_UNSAT:
+ if (bufp->symbol_type != ST_STORAGE)
+ sym->symbol.section = &bfd_und_section;
+ else
+ sym->symbol.section = &bfd_com_section;
+ break;
+
case SS_UNIVERSAL:
sym->symbol.flags |= (BSF_EXPORT | BSF_GLOBAL);
sym->symbol.section
break;
}
- /* Mark symbols left around by the debugger. */
- if (strlen (sym->symbol.name) >= 2
- && sym->symbol.name[0] == 'L'
- && (sym->symbol.name[1] == '$' || sym->symbol.name[2] == '$'
- || sym->symbol.name[3] == '$'))
+ /* Mark section symbols and symbols used by the debugger. */
+ if (!strcmp (sym->symbol.name, "L$0\002"))
+ sym->symbol.flags |= BSF_SECTION_SYM;
+ else if (!strncmp (sym->symbol.name, "L$0", 3))
sym->symbol.flags |= BSF_DEBUGGING;
/* Note increment at bottom of loop, since we skip some symbols