+2009-01-27 Hans-Peter Nilsson <hp@axis.com>
+
+ * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_8>
+ <R_CRIS_16, R_CRIS_32>: Don't call BFD_ASSERT for weak undefined
+ symbols with non-default visibility.
+
2009-01-26 Nathan Sidwell <nathan@codesourcery.com>
* elf32-ppc.c (ppc_elf_relax_section): Add space for relocs
rel->r_offset);
if (outrel.r_offset == (bfd_vma) -1)
skip = TRUE;
- else if (outrel.r_offset == (bfd_vma) -2)
+ else if (outrel.r_offset == (bfd_vma) -2
+ /* For now, undefined weak symbols with non-default
+ visibility (yielding 0), like exception info for
+ discarded sections, will get a R_CRIS_NONE
+ relocation rather than no relocation, because we
+ notice too late that the symbol doesn't need a
+ relocation. */
+ || (h != NULL
+ && h->root.type == bfd_link_hash_undefweak
+ && ELF_ST_VISIBILITY (h->other) != STV_DEFAULT))
skip = TRUE, relocate = TRUE;
outrel.r_offset += (input_section->output_section->vma
+ input_section->output_offset);