aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elflink.c7
2 files changed, 11 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index b5e5788..1c9e201 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2016-02-18 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/19617
+ * elflink.c (elf_link_add_object_symbols): Always create dynamic
+ sections for -E/--dynamic-list.
+
2016-02-17 H.J. Lu <hongjiu.lu@intel.com>
* elf64-x86-64.c (elf_backend_omit_section_dynsym): New. Defined
diff --git a/bfd/elflink.c b/bfd/elflink.c
index ac03ce5..c7672ed 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -3598,11 +3598,14 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
/* If we are creating a shared library, create all the dynamic
sections immediately. We need to attach them to something,
so we attach them to this BFD, provided it is the right
- format and is not from ld --just-symbols. FIXME: If there
+ format and is not from ld --just-symbols. Always create the
+ dynamic sections for -E/--dynamic-list. FIXME: If there
are no input BFD's of the same format as the output, we can't
make a shared library. */
if (!just_syms
- && bfd_link_pic (info)
+ && (bfd_link_pic (info)
+ || info->export_dynamic
+ || info->dynamic)
&& is_elf_hash_table (htab)
&& info->output_bfd->xvec == abfd->xvec
&& !htab->dynamic_sections_created)