+2011-09-06 Alan Modra <amodra@gmail.com>
+
+ PR ld/13131
+ * elf64-ppc.c (adjust_toc_syms): Delete redundant code.
+ (ppc64_elf_edit_toc): Fix style nit. Report some details
+ on linker failure due to reference in debug or non-alloc
+ sections to optimized away toc entry, and don't abort.
+
2011-09-01 Christophe Lyon <christophe.lyon@st.com>
* elf32-arm.c (elf32_arm_output_arch_local_syms): Skip excluded
struct adjust_toc_info *toc_inf = (struct adjust_toc_info *) inf;
unsigned long i;
- if (h->root.type == bfd_link_hash_indirect)
- return TRUE;
-
if (h->root.type != bfd_link_hash_defined
&& h->root.type != bfd_link_hash_defweak)
return TRUE;
some_unused = 1;
last = 0;
}
- else if (*drop & ref_from_discarded)
+ else if ((*drop & ref_from_discarded) != 0)
{
some_unused = 1;
last = ref_from_discarded;
break;
default:
- abort ();
+ info->callbacks->einfo
+ (_("%P: %H: %s relocation references "
+ "optimized away TOC entry\n"),
+ ibfd, sec, rel->r_offset,
+ ppc64_elf_howto_table[r_type]->name);
+ bfd_set_error (bfd_error_bad_value);
+ goto error_ret;
}
rel->r_addend = tocrel->r_addend;
elf_section_data (sec)->relocs = relstart;