summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2003-04-03 04:02:02 +0000
committerAlan Modra <amodra@bigpond.net.au>2003-04-03 04:02:02 +0000
commit797273819f84d9c4d50d761519a5301c92e9cc61 (patch)
tree4d4783de62c3dbc2a4e17850973f8716cf3ab584
parent103a9f3d96948bc456ba9db944389265f2057bde (diff)
downloadgdb-797273819f84d9c4d50d761519a5301c92e9cc61.tar.gz
* elf32-ppc.c (SYMBOL_REFERENCES_LOCAL): Expand comment.
-rw-r--r--bfd/ChangeLog1
-rw-r--r--bfd/elf32-ppc.c8
2 files changed, 7 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 122369d89c4..45632e537f3 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -3,6 +3,7 @@
* elf32-ppc.c (ppc_elf_check_relocs): Don't use SYMBOL_REFERENCES_LOCAL
here as it's too early to reliably determine locality.
(ppc_elf_gc_sweep_hook): Likewise.
+ (SYMBOL_REFERENCES_LOCAL): Expand comment.
2003-04-02 Bob Wilson <bob.wilson@acm.org>
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index 6fdfebe795f..186f39d82b6 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -147,8 +147,12 @@ static bfd_boolean ppc_elf_grok_psinfo
#define DTP_OFFSET 0x8000
/* Will references to this symbol always reference the symbol
- in this object? */
-#define SYMBOL_REFERENCES_LOCAL(INFO, H) \
+ 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. */
+#define SYMBOL_REFERENCES_LOCAL(INFO, H) \
((! INFO->shared \
|| INFO->symbolic \
|| H->dynindx == -1 \