- {
- elf32_symbol_type *esym = (elf32_symbol_type *) sym;
- unsigned long size = esym->internal_elf_sym.st_size;
- record_minimal_symbol_and_info ((char *) sym -> name, symaddr,
- ms_type, (PTR) size, objfile);
- }
- }
-
- /* See if this is a debugging symbol that helps Solaris
- stabs-in-elf debugging. */
-
- else if (sym->flags & BSF_FILE)
- {
- /* Chain any old one onto the objfile; remember new sym. */
- if (sectinfo)
- {
- sectinfo->next = dbx->stab_section_info;
- dbx->stab_section_info = sectinfo;
- sectinfo = 0;
- }
- filesym = sym;
- }
- else if ((sym->flags & BSF_LOCAL) &&
- (sym->section) &&
- (sym->section->flags & SEC_DATA) &&
- (sym->name))
- {
- /* Named Local variable in a Data section. Check its name. */
- index = -1;
- switch (sym->name[1])
- {
- case 'b':
- if (STREQ ("Bbss.bss", sym->name))
- index = SECT_OFF_BSS;
- break;
- case 'd':
- if (STREQ ("Ddata.data", sym->name))
- index = SECT_OFF_DATA;
- break;
- case 'r':
- if (STREQ ("Drodata.rodata", sym->name))
- index = SECT_OFF_RODATA;
- break;
- }
- if (index > 0)
- {
- /* We have some new info. Allocate a sectinfo, if
- needed, and fill it in. */
- if (!sectinfo)
- {
- sectinfo = (struct stab_section_info *)
- xmmalloc (objfile -> md,
- sizeof (*sectinfo));
- memset ((PTR) sectinfo, 0, sizeof (*sectinfo));
- if (!filesym)
- complain (§ion_info_complaint, sym->name);
- else
- sectinfo->filename = (char *)filesym->name;
- }
- if (sectinfo->sections[index])
- complain (§ion_info_dup_complaint, sectinfo->filename);
-
- /* Bfd symbols are section relative. */
- symaddr = sym -> value + sym -> section -> vma;
- /* Relocate all non-absolute symbols by base address. */
- if (sym -> section != &bfd_abs_section)
- symaddr += addr;
- sectinfo->sections[index] = symaddr;
- }
+ size = ((elf_symbol_type *) sym)->internal_elf_sym.st_size;
+ msym = record_minimal_symbol_and_info
+ ((char *) sym->name, symaddr,
+ ms_type, (PTR) size, sym->section, objfile);
+#ifdef SOFUN_ADDRESS_MAYBE_MISSING
+ if (msym != NULL)
+ msym->filename = filesymname;
+#endif
+#ifdef ELF_MAKE_MSYMBOL_SPECIAL
+ ELF_MAKE_MSYMBOL_SPECIAL (sym, msym);
+#endif