+ memcpy (name, namestring, name_len);
+ name[name_len] = '\0';
+ function_outside_compilation_unit_complaint (name);
+ xfree (name);
+ }
+ nlist.n_value += ANOFFSET (objfile->section_offsets,
+ SECT_OFF_TEXT (objfile));
+ /* Kludges for ELF/STABS with Sun ACC. */
+ last_function_name = namestring;
+ /* Do not fix textlow==0 for .o or NLM files, as 0 is a legit
+ value for the bottom of the text seg in those cases. */
+ if (nlist.n_value == ANOFFSET (objfile->section_offsets,
+ SECT_OFF_TEXT (objfile))
+ && gdbarch_sofun_address_maybe_missing (gdbarch))
+ {
+ CORE_ADDR minsym_valu =
+ find_stab_function_addr (namestring,
+ pst ? pst->filename : NULL,
+ objfile);
+
+ /* find_stab_function_addr will return 0 if the minimal
+ symbol wasn't found. (Unfortunately, this might also
+ be a valid address.) Anyway, if it *does* return 0,
+ it is likely that the value was set correctly to begin
+ with... */
+ if (minsym_valu != 0)
+ nlist.n_value = minsym_valu;
+ }
+ if (pst && textlow_not_set
+ && gdbarch_sofun_address_maybe_missing (gdbarch))
+ {
+ pst->textlow = nlist.n_value;
+ textlow_not_set = 0;
+ }
+ /* End kludge. */
+
+ /* Keep track of the start of the last function so we
+ can handle end of function symbols. */
+ last_function_start = nlist.n_value;
+
+ /* In reordered executables this function may lie outside
+ the bounds created by N_SO symbols. If that's the case
+ use the address of this function as the low bound for
+ the partial symbol table. */
+ if (pst
+ && (textlow_not_set
+ || (nlist.n_value < pst->textlow
+ && (nlist.n_value
+ != ANOFFSET (objfile->section_offsets,
+ SECT_OFF_TEXT (objfile))))))
+ {
+ pst->textlow = nlist.n_value;
+ textlow_not_set = 0;
+ }
+ add_psymbol_to_list (sym_name, sym_len, 1,
+ VAR_DOMAIN, LOC_BLOCK,
+ &objfile->global_psymbols,
+ 0, nlist.n_value,
+ psymtab_language, objfile);
+ continue;
+
+ /* Two things show up here (hopefully); static symbols of
+ local scope (static used inside braces) or extensions
+ of structure symbols. We can ignore both. */
+ case 'V':
+ case '(':
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ case '-':
+ case '#': /* For symbol identification (used in live ranges). */
+ continue;
+
+ case ':':
+ /* It is a C++ nested symbol. We don't need to record it
+ (I don't think); if we try to look up foo::bar::baz,
+ then symbols for the symtab containing foo should get
+ read in, I think. */
+ /* Someone says sun cc puts out symbols like
+ /foo/baz/maclib::/usr/local/bin/maclib,
+ which would get here with a symbol type of ':'. */
+ continue;
+
+ default:
+ /* Unexpected symbol descriptor. The second and subsequent stabs
+ of a continued stab can show up here. The question is
+ whether they ever can mimic a normal stab--it would be
+ nice if not, since we certainly don't want to spend the
+ time searching to the end of every string looking for
+ a backslash. */
+
+ complaint (&symfile_complaints,
+ _("unknown symbol descriptor `%c'"),
+ p[1]);
+
+ /* Ignore it; perhaps it is an extension that we don't
+ know about. */
+ continue;
+ }
+ }
+
+ case N_EXCL: