summaryrefslogtreecommitdiff
path: root/bfd/elf64-sparc.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2001-05-23 08:23:27 +0000
committerNick Clifton <nickc@redhat.com>2001-05-23 08:23:27 +0000
commite5737f21997ad6d66ca20f48c4be8ba90b1e70c0 (patch)
treec5bcbd60c3ccb2a66be479036544c15a9fdddea7 /bfd/elf64-sparc.c
parent2dbcb871c99a5743bc9de97b9a00caa3e9ca9a86 (diff)
downloadgdb-e5737f21997ad6d66ca20f48c4be8ba90b1e70c0.tar.gz
Replace sh_size/sh_entsize with NUM_SHDR_ENTRIES
Diffstat (limited to 'bfd/elf64-sparc.c')
-rw-r--r--bfd/elf64-sparc.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/bfd/elf64-sparc.c b/bfd/elf64-sparc.c
index dc393b30295..295bd2f5439 100644
--- a/bfd/elf64-sparc.c
+++ b/bfd/elf64-sparc.c
@@ -396,7 +396,7 @@ sparc64_elf_slurp_reloc_table (abfd, asect, symbols, dynamic)
return true;
rel_hdr = &d->this_hdr;
- asect->reloc_count = rel_hdr->sh_size / rel_hdr->sh_entsize;
+ asect->reloc_count = NUM_SHDR_ENTRIES (rel_hdr);
rel_hdr2 = NULL;
}
@@ -996,8 +996,7 @@ sparc64_elf_check_relocs (abfd, info, sec, relocs)
srelgot = NULL;
sreloc = NULL;
- rel_end = relocs + elf_section_data (sec)->rel_hdr.sh_size
- / elf_section_data (sec)->rel_hdr.sh_entsize;
+ rel_end = relocs + NUM_SHDR_ENTRIES (& elf_section_data (sec)->rel_hdr);
for (rel = relocs; rel < rel_end; rel++)
{
unsigned long r_symndx;
@@ -1903,8 +1902,7 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
sgot = splt = sreloc = NULL;
rel = relocs;
- relend = relocs + elf_section_data (input_section)->rel_hdr.sh_size
- / elf_section_data (input_section)->rel_hdr.sh_entsize;
+ relend = relocs + NUM_SHDR_ENTIRES (& elf_section_data (input_section)->rel_hdr);
for (; rel < relend; rel++)
{
int r_type;