Since dynamic sections aren't applicable to relocatable file, don't
create dynamic sections for -E/--dynamic-list when relocatable.
bfd/
PR ld/19789
* elflink.c (elf_link_add_object_symbols): Create dynamic sections
for -E/--dynamic-list only when not relocatable.
ld/
PR ld/19789
* testsuite/ld-elf/pr19789.d: New file.
* testsuite/ld-elf/pr19789.s: Likewise.
+2016-03-08 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/19789
+ * elflink.c (elf_link_add_object_symbols): Create dynamic sections
+ for -E/--dynamic-list only when not relocatable.
+
2016-03-08 H.J. Lu <hongjiu.lu@intel.com>
PR ld/19784
make a shared library. */
if (!just_syms
&& (bfd_link_pic (info)
- || info->export_dynamic
- || info->dynamic)
+ || (!bfd_link_relocatable (info)
+ && (info->export_dynamic || info->dynamic)))
&& is_elf_hash_table (htab)
&& info->output_bfd->xvec == abfd->xvec
&& !htab->dynamic_sections_created)
+2016-03-08 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/19789
+ * testsuite/ld-elf/pr19789.d: New file.
+ * testsuite/ld-elf/pr19789.s: Likewise.
+
2016-03-08 H.J. Lu <hongjiu.lu@intel.com>
PR ld/19784
--- /dev/null
+#ld: -r -E
+#readelf: -s --wide
+#target: *-*-linux* *-*-gnu* *-*-solaris*
+
+Symbol table '\.symtab' contains [0-9]+ entries:
+#...
+ +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +FUNC +GLOBAL +DEFAULT +[0-9]+ +foo@@VERS.2
+#...
+ +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +FUNC +GLOBAL +DEFAULT +[0-9]+ +foo@VERS.1
+#pass
--- /dev/null
+ .text
+ .globl __foo
+ .type __foo, %function
+__foo:
+ .byte 0
+ .globl __foo1
+ .set __foo1, __foo
+ .symver __foo,foo@@VERS.2
+ .symver __foo1,foo@VERS.1