diff options
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/elflink.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c index b741e7e..ccb7ba2 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -9217,8 +9217,12 @@ elf_link_output_extsym (struct bfd_hash_entry *bh, void *data) /* Since there is no version information in the dynamic string, if there is no version info in symbol version section, we will - have a run-time problem. */ - if (h->verinfo.verdef == NULL) + have a run-time problem if not linking executable, referenced + by shared library, or not locally defined. */ + if (h->verinfo.verdef == NULL + && (!flinfo->info->executable + || h->ref_dynamic + || !h->def_regular)) { char *p = strrchr (h->root.root.string, ELF_VER_CHR); |