2010-06-27 Alan Modra <amodra@gmail.com>
+ * elf64-ppc.c (get_tls_mask): Don't segfault on NULL elf_section_data.
+ (group_sections): Likewise.
+
+2010-06-27 Alan Modra <amodra@gmail.com>
+
* bout.c (aligncode): Delete set but unused variables.
* coff-mcore.c (coff_mcore_relocate_section): Likewise.
* coff-ppc.c (ppc_record_toc_entry): Likewise.
if ((*tls_maskp != NULL && **tls_maskp != 0)
|| sec == NULL
+ || ppc64_elf_section_data (sec) == NULL
|| ppc64_elf_section_data (sec)->sec_type != sec_toc)
return 1;
curr = tail;
total = tail->size;
- big_sec = total > (ppc64_elf_section_data (tail)->has_14bit_branch
+ big_sec = total > (ppc64_elf_section_data (tail) != NULL
+ && ppc64_elf_section_data (tail)->has_14bit_branch
? stub14_group_size : stub_group_size);
if (big_sec && !suppress_size_errors)
(*_bfd_error_handler) (_("%B section %A exceeds stub group size"),
while ((prev = PREV_SEC (curr)) != NULL
&& ((total += curr->output_offset - prev->output_offset)
- < (ppc64_elf_section_data (prev)->has_14bit_branch
+ < (ppc64_elf_section_data (prev) != NULL
+ && ppc64_elf_section_data (prev)->has_14bit_branch
? stub14_group_size : stub_group_size))
&& htab->stub_group[prev->id].toc_off == curr_toc)
curr = prev;
total = 0;
while (prev != NULL
&& ((total += tail->output_offset - prev->output_offset)
- < (ppc64_elf_section_data (prev)->has_14bit_branch
+ < (ppc64_elf_section_data (prev) != NULL
+ && ppc64_elf_section_data (prev)->has_14bit_branch
? stub14_group_size : stub_group_size))
&& htab->stub_group[prev->id].toc_off == curr_toc)
{