diff options
author | Hans-Peter Nilsson <hp@axis.com> | 2009-01-27 06:07:54 +0000 |
---|---|---|
committer | Hans-Peter Nilsson <hp@axis.com> | 2009-01-27 06:07:54 +0000 |
commit | b3bf42d83b95779e9bd9df56982a6dbe39bf76c1 (patch) | |
tree | 9b63cbdc6f27a961607cd3e22cd889f38f01258c | |
parent | eb0d5aa9ea70fcd48a6f621700203493139638ee (diff) | |
download | gdb-b3bf42d83b95779e9bd9df56982a6dbe39bf76c1.zip gdb-b3bf42d83b95779e9bd9df56982a6dbe39bf76c1.tar.gz gdb-b3bf42d83b95779e9bd9df56982a6dbe39bf76c1.tar.bz2 |
* 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.
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/elf32-cris.c | 11 |
2 files changed, 16 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 5873b1b..9961869 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +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 diff --git a/bfd/elf32-cris.c b/bfd/elf32-cris.c index 4b59d33..6b71ee4 100644 --- a/bfd/elf32-cris.c +++ b/bfd/elf32-cris.c @@ -1528,7 +1528,16 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section, 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); |