bfd/
authorRichard Sandiford <rdsandiford@googlemail.com>
Sat, 22 Jan 2011 10:16:29 +0000 (10:16 +0000)
committerRichard Sandiford <rdsandiford@googlemail.com>
Sat, 22 Jan 2011 10:16:29 +0000 (10:16 +0000)
* elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Ignore
common sections too.

ld/
* plugin.c (plugin_get_ir_dummy_bfd): Copy across the bfd's
private data and GP size.

bfd/ChangeLog
bfd/elfxx-mips.c
ld/ChangeLog
ld/plugin.c

index b35646c645f4c0da0cbe7e9ada52d1c0ce2ad9c2..9bbd32931475e52423a657b9926f4a3ef6436b2b 100644 (file)
@@ -1,3 +1,8 @@
+2011-01-22  Richard Sandiford  <rdsandiford@googlemail.com>
+
+       * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Ignore
+       common sections too.
+
 2011-01-18  H.J. Lu  <hongjiu.lu@intel.com>
 
        * elf64-x86-64.c (elf_backend_want_plt_sym): Redefine to 0 after
index dcf6a9e7b1132cd43b9097c76195934384bf0a52..d5e99bbb204ce79f4ece14dcb22fc06688904466 100644 (file)
@@ -12597,8 +12597,11 @@ _bfd_mips_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
   for (sec = ibfd->sections; sec != NULL; sec = sec->next)
     {
       /* Ignore synthetic sections and empty .text, .data and .bss sections
-         which are automatically generated by gas.  */
-      if (strcmp (sec->name, ".reginfo")
+        which are automatically generated by gas.  Also ignore fake
+        (s)common sections, since merely defining a common symbol does
+        not affect compatibility.  */
+      if ((sec->flags & SEC_IS_COMMON) == 0
+         && strcmp (sec->name, ".reginfo")
          && strcmp (sec->name, ".mdebug")
          && (sec->size != 0
              || (strcmp (sec->name, ".text")
index fe66fb886dfb32f516388f376010972c6acee8fd..cdc34d6a8e35845f3a3ac17bd5b5b5e232e0279c 100644 (file)
@@ -1,3 +1,8 @@
+2011-01-22  Richard Sandiford  <rdsandiford@googlemail.com>
+
+       * plugin.c (plugin_get_ir_dummy_bfd): Copy across the bfd's
+       private data and GP size.
+
 2011-01-21  Alan Modra  <amodra@gmail.com>
 
        * ldexp.c (fold_binary): Set result section for arithmetic and
index 05379b8e61052e785f1780583cd4e9ed314ff5ae..b285787694b724ad8ea5b23d3074afe2ec159635 100644 (file)
@@ -237,6 +237,8 @@ plugin_get_ir_dummy_bfd (const char *name, bfd *srctemplate)
                     srctemplate);
   bfd_set_arch_info (abfd, bfd_get_arch_info (srctemplate));
   bfd_make_writable (abfd);
+  bfd_copy_private_bfd_data (srctemplate, abfd);
+  bfd_set_gp_size (abfd, bfd_get_gp_size (abfd));
   /* Create a minimal set of sections to own the symbols.  */
   sec = bfd_make_section_old_way (abfd, ".text");
   bfd_set_section_flags (abfd, sec,