+ el.name = (*oso_sym)->name;
+ el.mtime = (*oso_sym)->value;
+ el.oso_sym = oso_sym;
+ el.end_sym = end_sym;
+ el.nbr_syms = nbr_syms;
+ VEC_safe_push (oso_el, *oso_vector_ptr, &el);
+}
+
+/* Add symbol SYM to the minimal symbol table of OBJFILE. */
+
+static void
+macho_symtab_add_minsym (struct objfile *objfile, const asymbol *sym)
+{
+ if (sym->name == NULL || *sym->name == '\0')
+ {
+ /* Skip names that don't exist (shouldn't happen), or names
+ that are null strings (may happen). */
+ return;
+ }
+
+ if (sym->flags & (BSF_GLOBAL | BSF_LOCAL | BSF_WEAK))
+ {
+ CORE_ADDR symaddr;
+ enum minimal_symbol_type ms_type;
+
+ /* Bfd symbols are section relative. */
+ symaddr = sym->value + sym->section->vma;
+
+ if (sym->section == bfd_abs_section_ptr)
+ ms_type = mst_abs;
+ else if (sym->section->flags & SEC_CODE)
+ {
+ if (sym->flags & (BSF_GLOBAL | BSF_WEAK))
+ ms_type = mst_text;
+ else
+ ms_type = mst_file_text;
+ }
+ else if (sym->section->flags & SEC_ALLOC)
+ {
+ if (sym->flags & (BSF_GLOBAL | BSF_WEAK))
+ {
+ if (sym->section->flags & SEC_LOAD)
+ ms_type = mst_data;
+ else
+ ms_type = mst_bss;
+ }
+ else if (sym->flags & BSF_LOCAL)
+ {
+ /* Not a special stabs-in-elf symbol, do regular
+ symbol processing. */
+ if (sym->section->flags & SEC_LOAD)
+ ms_type = mst_file_data;
+ else
+ ms_type = mst_file_bss;
+ }
+ else
+ ms_type = mst_unknown;
+ }
+ else
+ return; /* Skip this symbol. */
+
+ prim_record_minimal_symbol_and_info
+ (sym->name, symaddr, ms_type,
+ gdb_bfd_section_index (objfile->obfd, sym->section),
+ objfile);
+ }