From: Alan Modra Date: Thu, 26 May 2011 04:28:20 +0000 (+0000) Subject: * elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Remove most of comment. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2676a7d99177c857a9cf46543f961816e2650365;p=binutils-gdb.git * elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Remove most of comment. * elflink.c (_bfd_elf_symbol_refs_local_p): Expand local_protected comment. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 1b049994b96..82ac7f62d58 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2011-05-26 Alan Modra + + * 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 * configure.in (bfd_elf32_ia64_big_vec, bfd_elf32_ia64_hpux_big_vec) diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h index b34845be3a0..59b6e72c62f 100644 --- a/bfd/elf-bfd.h +++ b/bfd/elf-bfd.h @@ -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) diff --git a/bfd/elflink.c b/bfd/elflink.c index 4675aab82ad..e8a6840c158 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -2881,8 +2881,10 @@ _bfd_elf_symbol_refs_local_p (struct elf_link_hash_entry *h, 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; }