===================================================================
RCS file: /cvs/src/src/bfd/elf-bfd.h,v
retrieving revision 1.319
@@ -232,11 +232,7 @@ struct elf_link_hash_entry
};
/* Will references to this symbol always reference the symbol
- in this object? STV_PROTECTED is excluded from the visibility test
- here so that function pointer comparisons work properly. Since
- function symbols not defined in an app are set to their .plt entry,
- it's necessary for shared libs to also reference the .plt even
- though the symbol is really local to the shared lib. */
+ in this object? */
#define SYMBOL_REFERENCES_LOCAL(INFO, H) \
_bfd_elf_symbol_refs_local_p (H, INFO, 0)
===================================================================
RCS file: /cvs/src/src/bfd/elflink.c,v
retrieving revision 1.405
@@ -2881,8 +2881,10 @@ _bfd_elf_symbol_refs_local_p (struct elf
return TRUE;
/* Function pointer equality tests may require that STV_PROTECTED
- symbols be treated as dynamic symbols, even when we know that the
- dynamic linker will resolve them locally. */
+ symbols be treated as dynamic symbols. If the address of a
+ function not defined in an executable is set to that function's
+ plt entry in the executable, then the address of the function in
+ a shared library must also be the plt entry in the executable. */
return local_protected;
}