Fix -Wshadow=local warning in sol_thread_target::wait
[deliverable/binutils-gdb.git] / bfd / mach-o.c
index d58e62d94e81d6d043d073d951581d8973299fb6..1b461f598873930067523090dded42465a816ea8 100644 (file)
@@ -2497,11 +2497,14 @@ bfd_mach_o_mangle_symbols (bfd *abfd)
            }
          else
            s->n_type = BFD_MACH_O_N_SECT;
-
-         if (s->symbol.flags & BSF_GLOBAL)
-           s->n_type |= BFD_MACH_O_N_EXT;
        }
 
+      /* Update external symbol bit in case objcopy changed it.  */
+      if (s->symbol.flags & BSF_GLOBAL)
+       s->n_type |= BFD_MACH_O_N_EXT;
+      else
+       s->n_type &= ~BFD_MACH_O_N_EXT;
+
       /* Put the section index in, where required.  */
       if ((s->symbol.section != bfd_abs_section_ptr
          && s->symbol.section != bfd_und_section_ptr
@@ -5532,6 +5535,13 @@ bfd_mach_o_fat_extract (bfd *abfd,
   return NULL;
 }
 
+static bfd_boolean
+bfd_mach_o_fat_close_and_cleanup (bfd *abfd)
+{
+  _bfd_unlink_from_archive_parent (abfd);
+  return TRUE;
+}
+
 int
 bfd_mach_o_lookup_command (bfd *abfd,
                           bfd_mach_o_load_command_type type,
@@ -6026,7 +6036,7 @@ bfd_mach_o_free_cached_info (bfd *abfd)
 /* Not yet handled: creating an archive.  */
 #define bfd_mach_o_mkarchive                     _bfd_noarchive_mkarchive
 
-#define bfd_mach_o_close_and_cleanup             _bfd_bool_bfd_true
+#define bfd_mach_o_close_and_cleanup             bfd_mach_o_fat_close_and_cleanup
 
 /* Not used.  */
 #define bfd_mach_o_generic_stat_arch_elt         bfd_mach_o_fat_stat_arch_elt
This page took 0.036856 seconds and 4 git commands to generate.