aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2011-10-25 03:13:32 +0000
committerAlan Modra <amodra@gmail.com>2011-10-25 03:13:32 +0000
commit89892769b6c8fabf7469ac996e9e8a5db2465c43 (patch)
treed0e432129a6f6daeca2bd40515e0e9d6078f1aaf
parent4332f25d64da5fccdae956d210c63db3b3129ac9 (diff)
downloadgdb-89892769b6c8fabf7469ac996e9e8a5db2465c43.zip
gdb-89892769b6c8fabf7469ac996e9e8a5db2465c43.tar.gz
gdb-89892769b6c8fabf7469ac996e9e8a5db2465c43.tar.bz2
PR ld/13311
2011-10-19 Alan Modra <amodra@gmail.com> * elflink.c (elf_link_output_extsym): Correct test for warning when forced local executable syms are referenced from shared libraries.
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elflink.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 9513fb7..a522790 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -2,6 +2,11 @@
Apply mainline patches
2011-10-19 Alan Modra <amodra@gmail.com>
+ PR ld/13311
+ * elflink.c (elf_link_output_extsym): Correct test for warning when
+ forced local executable syms are referenced from shared libraries.
+
+ 2011-10-19 Alan Modra <amodra@gmail.com>
PR ld/13254
* elflink.c (bfd_elf_final_link): Emit error_textrel error.
diff --git a/bfd/elflink.c b/bfd/elflink.c
index be0a6ce..dfd9b43 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -8659,10 +8659,11 @@ elf_link_output_extsym (struct bfd_hash_entry *bh, void *data)
/* We should also warn if a forced local symbol is referenced from
shared libraries. */
- if (! finfo->info->relocatable
- && (! finfo->info->shared)
+ if (!finfo->info->relocatable
+ && finfo->info->executable
&& h->forced_local
&& h->ref_dynamic
+ && h->def_regular
&& !h->dynamic_def
&& !h->dynamic_weak
&& ! elf_link_check_versioned_symbol (finfo->info, bed, h))