diff options
author | Richard Henderson <rth@redhat.com> | 1999-06-10 20:59:54 +0000 |
---|---|---|
committer | Richard Henderson <rth@redhat.com> | 1999-06-10 20:59:54 +0000 |
commit | 60dac29966ebf4a075b7d70257f008c53756e3fb (patch) | |
tree | 9eea3687d34b06d62ea0f92fe3e3adeeadc73864 /bfd | |
parent | d7ba4a779e0a1dba7c377b83a2747a186b21b527 (diff) | |
download | gdb-60dac29966ebf4a075b7d70257f008c53756e3fb.zip gdb-60dac29966ebf4a075b7d70257f008c53756e3fb.tar.gz gdb-60dac29966ebf4a075b7d70257f008c53756e3fb.tar.bz2 |
Jakub Jelinek <jj@ultra.linux.cz>
* elf64_sparc.c (sparc64_elf_relocate_section): Use R_SPARC_max_std
instead of R_SPARC_max.
(sparc64_elf_info_to_howto): Likewise.
* elf32_sparc.c (elf32_sparc_relocate_section): Likewise.
(elf32_sparc_info_to_howto): Likewise; handle vtable relocations.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 8 | ||||
-rw-r--r-- | bfd/elf32-sparc.c | 18 | ||||
-rw-r--r-- | bfd/elf64-sparc.c | 4 |
3 files changed, 25 insertions, 5 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index e5fd81d..bc16078 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,11 @@ +1999-06-10 Jakub Jelinek <jj@ultra.linux.cz> + + * elf64_sparc.c (sparc64_elf_relocate_section): Use R_SPARC_max_std + instead of R_SPARC_max. + (sparc64_elf_info_to_howto): Likewise. + * elf32_sparc.c (elf32_sparc_relocate_section): Likewise. + (elf32_sparc_info_to_howto): Likewise; handle vtable relocations. + 1999-06-07 Richard Henderson <rth@cygnus.com> * section.c (_bfd_strip_section_from_output): Remove output diff --git a/bfd/elf32-sparc.c b/bfd/elf32-sparc.c index ec57c8c..f02702c 100644 --- a/bfd/elf32-sparc.c +++ b/bfd/elf32-sparc.c @@ -215,8 +215,20 @@ elf32_sparc_info_to_howto (abfd, cache_ptr, dst) arelent *cache_ptr; Elf_Internal_Rela *dst; { - BFD_ASSERT (ELF32_R_TYPE(dst->r_info) < (unsigned int) R_SPARC_max); - cache_ptr->howto = &_bfd_sparc_elf_howto_table[ELF32_R_TYPE(dst->r_info)]; + switch (ELF32_R_TYPE(dst->r_info)) + { + case R_SPARC_GNU_VTINHERIT: + cache_ptr->howto = &elf32_sparc_vtinherit_howto; + break; + + case R_SPARC_GNU_VTENTRY: + cache_ptr->howto = &elf32_sparc_vtentry_howto; + break; + + default: + BFD_ASSERT (ELF32_R_TYPE(dst->r_info) < (unsigned int) R_SPARC_max_std); + cache_ptr->howto = &_bfd_sparc_elf_howto_table[ELF32_R_TYPE(dst->r_info)]; + } } /* For unsupported relocs. */ @@ -1134,7 +1146,7 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section, || r_type == R_SPARC_GNU_VTENTRY) continue; - if (r_type < 0 || r_type >= (int) R_SPARC_max) + if (r_type < 0 || r_type >= (int) R_SPARC_max_std) { bfd_set_error (bfd_error_bad_value); return false; diff --git a/bfd/elf64-sparc.c b/bfd/elf64-sparc.c index 17fe98d..def6bce 100644 --- a/bfd/elf64-sparc.c +++ b/bfd/elf64-sparc.c @@ -213,7 +213,7 @@ sparc64_elf_info_to_howto (abfd, cache_ptr, dst) arelent *cache_ptr; Elf64_Internal_Rela *dst; { - BFD_ASSERT (ELF64_R_TYPE (dst->r_info) < (unsigned int) R_SPARC_max); + BFD_ASSERT (ELF64_R_TYPE (dst->r_info) < (unsigned int) R_SPARC_max_std); cache_ptr->howto = &sparc64_elf_howto_table[ELF64_R_TYPE (dst->r_info)]; } @@ -1246,7 +1246,7 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section, bfd_reloc_status_type r; r_type = ELF64_R_TYPE (rel->r_info); - if (r_type < 0 || r_type >= (int) R_SPARC_max) + if (r_type < 0 || r_type >= (int) R_SPARC_max_std) { bfd_set_error (bfd_error_bad_value); return false; |