- {
- /* Normal symbol. */
- asection *sec = sym->section;
- bfd_mach_o_section *msec;
- unsigned int sec_type;
-
- /* Skip buggy ones. */
- if (sec == NULL || sections_rebased[sec->index] != 0)
- continue;
-
- /* Only consider regular, non-debugging sections. */
- msec = bfd_mach_o_get_mach_o_section (sec);
- sec_type = msec->flags & BFD_MACH_O_SECTION_TYPE_MASK;
- if ((sec_type == BFD_MACH_O_S_REGULAR
- || sec_type == BFD_MACH_O_S_ZEROFILL)
- && (msec->flags & BFD_MACH_O_S_ATTR_DEBUG) == 0)
- {
- CORE_ADDR addr = 0;
-
- if ((mach_o_sym->n_type & BFD_MACH_O_N_EXT) != 0)
- {
- /* Use the min symtab for global symbols. */
- addr = macho_resolve_oso_sym_with_minsym (main_objfile, sym);
- }
- else
- {
- struct macho_sym_hash_entry *ent;
-
- ent = (struct macho_sym_hash_entry *)
- bfd_hash_lookup (&table, sym->name, FALSE, FALSE);
- if (ent != NULL)
- addr = bfd_asymbol_value (ent->sym);
- }
-
- /* Adjust the section. */
- if (addr != 0)
- {
- CORE_ADDR res = addr - sym->value;
-
- if (mach_o_debug_level > 3)
- {
- struct gdbarch *arch = get_objfile_arch (main_objfile);
- printf_unfiltered
- (_("resolve sect %s with %s (set to %s)\n"),
- sec->name, sym->name,
- paddress (arch, res));
- }
- bfd_set_section_vma (abfd, sec, res);
- sections_rebased[sec->index] = 1;
- }
- }
- else
- {
- /* Mark the section as never rebased. */
- sections_rebased[sec->index] = 2;
- }
- }
+ {
+ /* Normal symbol. */
+ asection *sec = sym->section;
+ bfd_mach_o_section *msec;
+ unsigned int sec_type;
+
+ /* Skip buggy ones. */
+ if (sec == NULL || sections_rebased[sec->index] != 0)
+ continue;
+
+ /* Only consider regular, non-debugging sections. */
+ msec = bfd_mach_o_get_mach_o_section (sec);
+ sec_type = msec->flags & BFD_MACH_O_SECTION_TYPE_MASK;
+ if ((sec_type == BFD_MACH_O_S_REGULAR
+ || sec_type == BFD_MACH_O_S_ZEROFILL)
+ && (msec->flags & BFD_MACH_O_S_ATTR_DEBUG) == 0)
+ {
+ CORE_ADDR addr = 0;
+
+ if ((mach_o_sym->n_type & BFD_MACH_O_N_EXT) != 0)
+ {
+ /* Use the min symtab for global symbols. */
+ addr = macho_resolve_oso_sym_with_minsym (main_objfile, sym);
+ }
+ else
+ {
+ struct macho_sym_hash_entry *ent;
+
+ ent = (struct macho_sym_hash_entry *)
+ bfd_hash_lookup (&table, sym->name, FALSE, FALSE);
+ if (ent != NULL)
+ addr = bfd_asymbol_value (ent->sym);
+ }
+
+ /* Adjust the section. */
+ if (addr != 0)
+ {
+ CORE_ADDR res = addr - sym->value;
+
+ if (mach_o_debug_level > 3)
+ {
+ struct gdbarch *arch = main_objfile->arch ();
+ printf_unfiltered
+ (_("resolve sect %s with %s (set to %s)\n"),
+ sec->name, sym->name,
+ paddress (arch, res));
+ }
+ bfd_set_section_vma (sec, res);
+ sections_rebased[sec->index] = 1;
+ }
+ }
+ else
+ {
+ /* Mark the section as never rebased. */
+ sections_rebased[sec->index] = 2;
+ }
+ }