FreeBSD/contrib/binutils/bfd/elflink.c
/* Mark sections containing dynamically referenced symbols.  When
   building shared libraries, we must assume that any visible symbol is
   referenced.  */
Mark sections containing dynamically referenced symbols.  When
building shared libraries, we must assume that any visible symbol is
referenced.
Mark sections containing dynamically referenced symbols . When building shared libraries we must assume that any visible symbol is referenced .
bfd_boolean
bfd_elf_gc_mark_dynamic_ref_symbol (struct elf_link_hash_entry *h, void *inf)
{
  struct bfd_link_info *info = (struct bfd_link_info *) inf;
  if (h->root.type == bfd_link_hash_warning)
    h = (struct elf_link_hash_entry *) h->root.u.i.link;
  if ((h->root.type == bfd_link_hash_defined
       || h->root.type == bfd_link_hash_defweak)
      && (h->ref_dynamic
	  || (!info->executable
	      && h->def_regular
	      && ELF_ST_VISIBILITY (h->other) != STV_INTERNAL
	      && ELF_ST_VISIBILITY (h->other) != STV_HIDDEN)))
    h->root.u.def.section->flags |= SEC_KEEP;
  return TRUE;
}
bfd_boolean bfd_elf_gc_mark_dynamic_ref_symbol ( struct elf_link_hash_entry * h , void * inf ) { struct bfd_link_info * info = ( struct bfd_link_info * ) inf ; if ( h -> root . type == bfd_link_hash_warning ) h = ( struct elf_link_hash_entry * ) h -> root . u . i . link ; if ( ( h -> root . type == bfd_link_hash_defined || h -> root . type == bfd_link_hash_defweak ) && ( h -> ref_dynamic || ( ! info -> executable && h -> def_regular && ELF_ST_VISIBILITY ( h -> other ) != STV_INTERNAL && ELF_ST_VISIBILITY ( h -> other ) != STV_HIDDEN ) ) ) h -> root . u . def . section -> flags |= SEC_KEEP ; return TRUE ; }
Mark sections containing dynamically referenced symbols.
Mark sections containing dynamically referenced symbols .