diff options
author | Jakub Jelinek <jakub@redhat.com> | 2001-02-09 17:31:11 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2001-02-09 17:31:11 +0000 |
commit | eadfa8abf1138d72fc1de3c37be9161ad3fdfbff (patch) | |
tree | 1b7dd32ad2579389a78860ce3cbbd4a27db9cbbf /bfd | |
parent | 7bb10502ed7272132d70a6c6d5450bdc94345566 (diff) | |
download | fsf-binutils-gdb-eadfa8abf1138d72fc1de3c37be9161ad3fdfbff.zip fsf-binutils-gdb-eadfa8abf1138d72fc1de3c37be9161ad3fdfbff.tar.gz fsf-binutils-gdb-eadfa8abf1138d72fc1de3c37be9161ad3fdfbff.tar.bz2 |
* elf64-sparc.c (sparc64_elf_check_relocs): Don't trust reloc_count.
(sparc64_elf_relocate_section): Likewise.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elf64-sparc.c | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 3061ae1..0a61d2e 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2001-02-09 Jakub Jelinek <jakub@redhat.com> + + * elf64-sparc.c (sparc64_elf_check_relocs): Don't trust reloc_count. + (sparc64_elf_relocate_section): Likewise. + 2001-02-09 Mark Kettenis <kettenis@gnu.org> * elf32-sparc.c (_bfd_sparc_elf_howto_table): Treat R_SPARC_UA32 diff --git a/bfd/elf64-sparc.c b/bfd/elf64-sparc.c index 7316d33..59e9f49 100644 --- a/bfd/elf64-sparc.c +++ b/bfd/elf64-sparc.c @@ -994,7 +994,8 @@ sparc64_elf_check_relocs (abfd, info, sec, relocs) srelgot = NULL; sreloc = NULL; - rel_end = relocs + sec->reloc_count; + rel_end = relocs + elf_section_data (sec)->rel_hdr.sh_size + / elf_section_data (sec)->rel_hdr.sh_entsize; for (rel = relocs; rel < rel_end; rel++) { unsigned long r_symndx; @@ -1900,7 +1901,8 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section, sgot = splt = sreloc = NULL; rel = relocs; - relend = relocs + input_section->reloc_count; + relend = relocs + elf_section_data (input_section)->rel_hdr.sh_size + / elf_section_data (input_section)->rel_hdr.sh_entsize; for (; rel < relend; rel++) { int r_type; |