* elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Remove most of comment.

* elflink.c (_bfd_elf_symbol_refs_local_p): Expand
	local_protected comment.
This commit is contained in:
Alan Modra 2011-05-26 04:28:20 +00:00
parent ea1f7d4c8e
commit 2676a7d991
3 changed files with 11 additions and 7 deletions

View File

@ -1,3 +1,9 @@
2011-05-26 Alan Modra <amodra@gmail.com>
* elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Remove most of comment.
* elflink.c (_bfd_elf_symbol_refs_local_p): Expand
local_protected comment.
2011-05-25 Tristan Gingold <gingold@adacore.com> 2011-05-25 Tristan Gingold <gingold@adacore.com>
* configure.in (bfd_elf32_ia64_big_vec, bfd_elf32_ia64_hpux_big_vec) * configure.in (bfd_elf32_ia64_big_vec, bfd_elf32_ia64_hpux_big_vec)

View File

@ -232,11 +232,7 @@ struct elf_link_hash_entry
}; };
/* Will references to this symbol always reference the symbol /* Will references to this symbol always reference the symbol
in this object? STV_PROTECTED is excluded from the visibility test in this object? */
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. */
#define SYMBOL_REFERENCES_LOCAL(INFO, H) \ #define SYMBOL_REFERENCES_LOCAL(INFO, H) \
_bfd_elf_symbol_refs_local_p (H, INFO, 0) _bfd_elf_symbol_refs_local_p (H, INFO, 0)

View File

@ -2881,8 +2881,10 @@ _bfd_elf_symbol_refs_local_p (struct elf_link_hash_entry *h,
return TRUE; return TRUE;
/* Function pointer equality tests may require that STV_PROTECTED /* Function pointer equality tests may require that STV_PROTECTED
symbols be treated as dynamic symbols, even when we know that the symbols be treated as dynamic symbols. If the address of a
dynamic linker will resolve them locally. */ 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; return local_protected;
} }