diff options
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elflink.c | 9 |
2 files changed, 12 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 9566198..4a45b55 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2018-01-30 Alan Modra <amodra@gmail.com> + + * elflink.c (bfd_elf_define_start_stop): Make __start and __stop + symbols dynamic. + 2018-01-29 Alan Modra <amodra@gmail.com> PR 22741 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; |