summaryrefslogtreecommitdiff
path: root/ld/emultempl/vxworks.em
diff options
context:
space:
mode:
Diffstat (limited to 'ld/emultempl/vxworks.em')
-rw-r--r--ld/emultempl/vxworks.em2
1 files changed, 1 insertions, 1 deletions
diff --git a/ld/emultempl/vxworks.em b/ld/emultempl/vxworks.em
index c3714338d9d..22bbda7d8d5 100644
--- a/ld/emultempl/vxworks.em
+++ b/ld/emultempl/vxworks.em
@@ -47,7 +47,7 @@ vxworks_after_open (void)
einfo ("%X%P: Cannot create dynamic sections %E\n");
if (!force_dynamic
- && !link_info.shared
+ && !bfd_link_pic (&link_info)
&& bfd_get_flavour (link_info.output_bfd) == bfd_target_elf_flavour
&& elf_hash_table (&link_info)->dynamic_sections_created)
einfo ("%X%P: Dynamic sections created in non-dynamic link\n");