summaryrefslogtreecommitdiff
path: root/bfd/elflink.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2013-03-22 23:35:55 +0000
committerAlan Modra <amodra@bigpond.net.au>2013-03-22 23:35:55 +0000
commitc5aca3f984a48150415a0eb23f0992587759662f (patch)
tree1de34d8b4f60d4d9d924b718a4ae4febefd7dbcb /bfd/elflink.c
parent1b1c3663e3607b2066dd22ea7b34b86597b81882 (diff)
downloadbinutils-redhat-c5aca3f984a48150415a0eb23f0992587759662f.tar.gz
PR ld/15270
* elflink.c (elf_link_add_object_symbols): Don't set def_regular or ref_regular for BFD_PLUGIN owned syms, or have them affect def_dynamic/ref_dynamic. (_bfd_elf_fix_symbol_flags): Don't set def_regular for BFD_PLUGIN owned syms.
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r--bfd/elflink.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c
index fa805bce21..be53ca3f9d 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -2491,7 +2491,7 @@ _bfd_elf_fix_symbol_flags (struct elf_link_hash_entry *h,
&& !h->def_regular
&& h->ref_regular
&& !h->def_dynamic
- && (h->root.u.def.section->owner->flags & DYNAMIC) == 0)
+ && (h->root.u.def.section->owner->flags & (DYNAMIC | BFD_PLUGIN)) == 0)
h->def_regular = 1;
/* If -Bsymbolic was used (which means to bind references to global
@@ -4361,7 +4361,12 @@ error_free_dyn:
is one which is referenced or defined by both a regular
object and a shared object. */
dynsym = FALSE;
- if (! dynamic)
+
+ /* Plugin symbols aren't normal. Don't set def_regular or
+ ref_regular for them, nor make them dynamic. */
+ if ((abfd->flags & BFD_PLUGIN) != 0)
+ ;
+ else if (! dynamic)
{
if (! definition)
{
@@ -4415,10 +4420,6 @@ error_free_dyn:
if (definition && (sec->flags & SEC_DEBUGGING) && !info->relocatable)
dynsym = FALSE;
- /* Nor should we make plugin symbols dynamic. */
- if ((abfd->flags & BFD_PLUGIN) != 0)
- dynsym = FALSE;
-
if (definition)
{
h->target_internal = isym->st_target_internal;