aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2011-01-22 10:16:29 +0000
committerRichard Sandiford <rdsandiford@googlemail.com>2011-01-22 10:16:29 +0000
commited88c97ee7df7c5464a536064a9fc8808d997a3e (patch)
treeb081844fb7527e6104c44ce2bb90bccbfd89ad8f
parentbb38e8717f91c94ca6451cb7374feeb285ad2c9c (diff)
downloadfsf-binutils-gdb-ed88c97ee7df7c5464a536064a9fc8808d997a3e.zip
fsf-binutils-gdb-ed88c97ee7df7c5464a536064a9fc8808d997a3e.tar.gz
fsf-binutils-gdb-ed88c97ee7df7c5464a536064a9fc8808d997a3e.tar.bz2
bfd/
* 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.
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elfxx-mips.c7
-rw-r--r--ld/ChangeLog5
-rw-r--r--ld/plugin.c2
4 files changed, 17 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index b35646c..9bbd329 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -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
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index dcf6a9e..d5e99bb 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -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")
diff --git a/ld/ChangeLog b/ld/ChangeLog
index fe66fb8..cdc34d6 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -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
diff --git a/ld/plugin.c b/ld/plugin.c
index 05379b8..b285787 100644
--- a/ld/plugin.c
+++ b/ld/plugin.c
@@ -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,