static int
simple_overlay_update_1 (struct obj_section *osect)
{
- int i, size;
+ int i;
bfd *obfd = osect->objfile->obfd;
asection *bsect = osect->the_bfd_section;
struct gdbarch *gdbarch = get_objfile_arch (osect->objfile);
int word_size = gdbarch_long_bit (gdbarch) / TARGET_CHAR_BIT;
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- size = bfd_get_section_size (osect->the_bfd_section);
for (i = 0; i < cache_novlys; i++)
if (cache_ovly_table[i][VMA] == bfd_section_vma (obfd, bsect)
- && cache_ovly_table[i][LMA] == bfd_section_lma (obfd, bsect)
- /* && cache_ovly_table[i][OSIZE] == size */ )
+ && cache_ovly_table[i][LMA] == bfd_section_lma (obfd, bsect))
{
read_target_long_array (cache_ovly_table_base + i * word_size,
(unsigned int *) cache_ovly_table[i],
4, word_size, byte_order);
if (cache_ovly_table[i][VMA] == bfd_section_vma (obfd, bsect)
- && cache_ovly_table[i][LMA] == bfd_section_lma (obfd, bsect)
- /* && cache_ovly_table[i][OSIZE] == size */ )
+ && cache_ovly_table[i][LMA] == bfd_section_lma (obfd, bsect))
{
osect->ovly_mapped = cache_ovly_table[i][MAPPED];
return 1;
ALL_OBJSECTIONS (objfile, osect)
if (section_is_overlay (osect))
{
- int i, size;
+ int i;
bfd *obfd = osect->objfile->obfd;
asection *bsect = osect->the_bfd_section;
- size = bfd_get_section_size (bsect);
for (i = 0; i < cache_novlys; i++)
if (cache_ovly_table[i][VMA] == bfd_section_vma (obfd, bsect)
- && cache_ovly_table[i][LMA] == bfd_section_lma (obfd, bsect)
- /* && cache_ovly_table[i][OSIZE] == size */ )
+ && cache_ovly_table[i][LMA] == bfd_section_lma (obfd, bsect))
{ /* obj_section matches i'th entry in ovly_table. */
osect->ovly_mapped = cache_ovly_table[i][MAPPED];
break; /* finished with inner for loop: break out. */