* elf32-tilepro.c (tilepro_elf_finish_dynamic_sections): Don't
authorMaciej W. Rozycki <macro@linux-mips.org>
Sat, 24 Aug 2013 22:16:41 +0000 (22:16 +0000)
committerMaciej W. Rozycki <macro@linux-mips.org>
Sat, 24 Aug 2013 22:16:41 +0000 (22:16 +0000)
set GOT's entry size if there is no ELF section data.
* elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
* elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_sections):
Likewise.

bfd/ChangeLog
bfd/elf32-tilepro.c
bfd/elf64-s390.c
bfd/elfxx-sparc.c

index 6e34cc75f20768218daae734b6d503561040aa91..cc4d7fdc7352ca5a9a6e5cf387b9157d9dc4475d 100644 (file)
@@ -1,3 +1,11 @@
+2013-08-24  Maciej W. Rozycki  <macro@linux-mips.org>
+
+       * elf32-tilepro.c (tilepro_elf_finish_dynamic_sections): Don't
+       set GOT's entry size if there is no ELF section data.
+       * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
+       * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_sections):
+       Likewise.
+
 2013-08-23  H.J. Lu  <hongjiu.lu@intel.com>
 
        * elf64-x86-64.c (get_elf_x86_64_arch_data): New.
index 62b95536478dbe4cd9ecaaeb989db4c3a0866fe5..c36da2bee24c01be46ebb1ec5fe1f9e8a7f7d9ee 100644 (file)
@@ -3909,8 +3909,9 @@ tilepro_elf_finish_dynamic_sections (bfd *output_bfd,
                  PLT_ENTRY_SIZE - PLT_HEADER_SIZE);
        }
 
-      elf_section_data (splt->output_section)->this_hdr.sh_entsize
-       = PLT_ENTRY_SIZE;
+      if (elf_section_data (splt->output_section) != NULL)
+       elf_section_data (splt->output_section)->this_hdr.sh_entsize
+         = PLT_ENTRY_SIZE;
     }
 
   if (htab->elf.sgotplt)
index 75413e03a9f81c75f95939df8fb699958b94bbbb..3aea98ce765f0cfba9d7437dc9f8644a7abaa897 100644 (file)
@@ -3692,8 +3692,9 @@ elf_s390_finish_dynamic_sections (bfd *output_bfd,
                       - htab->elf.splt->output_section->vma - 6)/2,
                      htab->elf.splt->contents + 8);
        }
-      elf_section_data (htab->elf.splt->output_section)
-       ->this_hdr.sh_entsize = PLT_ENTRY_SIZE;
+      if (elf_section_data (htab->elf.splt->output_section) != NULL)
+       elf_section_data (htab->elf.splt->output_section)->this_hdr.sh_entsize
+         = PLT_ENTRY_SIZE;
     }
 
   if (htab->elf.sgotplt)
index ba001056af9bdfce634c09966abd90cc084ab580..94da3600a820696a58e475695347ba06df64ff5d 100644 (file)
@@ -4793,9 +4793,10 @@ _bfd_sparc_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *i
            }
        }
 
-      elf_section_data (splt->output_section)->this_hdr.sh_entsize
-       = (htab->is_vxworks || !ABI_64_P (output_bfd))
-         ? 0 : htab->plt_entry_size;
+      if (elf_section_data (splt->output_section) != NULL)
+        elf_section_data (splt->output_section)->this_hdr.sh_entsize
+          = ((htab->is_vxworks || !ABI_64_P (output_bfd))
+             ? 0 : htab->plt_entry_size);
     }
 
   /* Set the first entry in the global offset table to the address of