FreeBSD/contrib/binutils/bfd/elf.c
/* Return the size required for the dynamic reloc entries.  Any loadable
   section that was actually installed in the BFD, and has type SHT_REL
   or SHT_RELA, and uses the dynamic symbol table, is considered to be a
   dynamic reloc section.  */
Return the size required for the dynamic reloc entries.  Any loadable
section that was actually installed in the BFD, and has type SHT_REL
or SHT_RELA, and uses the dynamic symbol table, is considered to be a
dynamic reloc section.
Return the size required for the dynamic reloc entries . Any loadable section that was actually installed in the BFD and has type SHT_REL or SHT_RELA and uses the dynamic symbol table is considered to be a dynamic reloc section .
long
_bfd_elf_get_dynamic_reloc_upper_bound (bfd *abfd)
{
  long ret;
  asection *s;
  if (elf_dynsymtab (abfd) == 0)
    {
      bfd_set_error (bfd_error_invalid_operation);
      return -1;
    }
  ret = sizeof (arelent *);
  for (s = abfd->sections; s != NULL; s = s->next)
    if ((s->flags & SEC_LOAD) != 0
	&& elf_section_data (s)->this_hdr.sh_link == elf_dynsymtab (abfd)
	&& (elf_section_data (s)->this_hdr.sh_type == SHT_REL
	    || elf_section_data (s)->this_hdr.sh_type == SHT_RELA))
      ret += ((s->size / elf_section_data (s)->this_hdr.sh_entsize)
	      * sizeof (arelent *));
  return ret;
}
long _bfd_elf_get_dynamic_reloc_upper_bound ( bfd * abfd ) { long ret ; asection * s ; if ( elf_dynsymtab ( abfd ) == 0 ) { bfd_set_error ( bfd_error_invalid_operation ) ; return -1 ; } ret = sizeof ( arelent * ) ; for ( s = abfd -> sections ; s != NULL ; s = s -> next ) if ( ( s -> flags & SEC_LOAD ) != 0 && elf_section_data ( s ) -> this_hdr . sh_link == elf_dynsymtab ( abfd ) && ( elf_section_data ( s ) -> this_hdr . sh_type == SHT_REL || elf_section_data ( s ) -> this_hdr . sh_type == SHT_RELA ) ) ret += ( ( s -> size / elf_section_data ( s ) -> this_hdr . sh_entsize ) * sizeof ( arelent * ) ) ; return ret ; }
Return the size required for the dynamic reloc entries.
Return the size required for the dynamic reloc entries .