From: Jeff Law Date: Tue, 15 Mar 1994 05:21:51 +0000 (+0000) Subject: * som.c (som_prep_for_fixups): A relocation involving the section X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=baef2065d089cf8bf5bff6cd29699b65836cb3c6;p=binutils-gdb.git * 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. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index d323a19cb80..262a5d0c129 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,12 @@ 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. diff --git a/bfd/som.c b/bfd/som.c index 02c4dab56c9..d399e0f11e3 100644 --- a/bfd/som.c +++ b/bfd/som.c @@ -2126,8 +2126,11 @@ som_prep_for_fixups (abfd, syms, num_syms) 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 @@ -3509,7 +3512,6 @@ som_slurp_symbol_table (abfd) /* 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 @@ -3517,6 +3519,13 @@ som_slurp_symbol_table (abfd) 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 @@ -3537,11 +3546,10 @@ som_slurp_symbol_table (abfd) 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