Don't create dynamic sections when relocatable
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 9 Mar 2016 04:41:41 +0000 (20:41 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 9 Mar 2016 04:45:52 +0000 (20:45 -0800)
commit9c1d7a087682074d585253ad38719ec2363eb2b7
tree782d27928686e190c232f3fe9457a5e30d574c80
parent7ff6eb49a2b79a2ad95c814ad990316545bf3692
Don't create dynamic sections when relocatable

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.
bfd/ChangeLog
bfd/elflink.c
ld/ChangeLog
ld/testsuite/ld-elf/pr19789.d [new file with mode: 0644]
ld/testsuite/ld-elf/pr19789.s [new file with mode: 0644]