aboutsummaryrefslogtreecommitdiff
path: root/bfd/elflink.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r--bfd/elflink.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c
index e81f6c6..f1ec880 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -14354,8 +14354,13 @@ bfd_elf_define_start_stop (struct bfd_link_info *info,
bed = get_elf_backend_data (info->output_bfd);
(*bed->elf_backend_hide_symbol) (info, h, TRUE);
}
- else if (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
- h->other = (h->other & ~ELF_ST_VISIBILITY (-1)) | STV_PROTECTED;
+ else
+ {
+ if (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
+ h->other = (h->other & ~ELF_ST_VISIBILITY (-1)) | STV_PROTECTED;
+ if (h->ref_dynamic || h->def_dynamic)
+ bfd_elf_link_record_dynamic_symbol (info, h);
+ }
return &h->root;
}
return NULL;