x86: Create dynamic sections in create_dynamic_sections
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 27 Apr 2017 20:55:31 +0000 (13:55 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 27 Apr 2017 20:55:48 +0000 (13:55 -0700)
commitde9a3c4285fad1914929ee304ddaa26e76af8031
treee3368c31ed041c51a8a396d4e758a3f10417ab25
parentda3d25afa26476bf24247b8696fd00ab31f39db9
x86: Create dynamic sections in create_dynamic_sections

This patch creates dynamic sections in i386/x86-64 create_dynamic_sections
instead of creating them on demend.  Linker will strip them if they are
empty.  It changes order in x86-64 .eh_frame section.  The extra DW_CFA_nop
paddings is due to

https://sourceware.org/bugzilla/show_bug.cgi?id=21441

bfd/

* elf32-i386.c (elf_i386_create_dynamic_sections): Create the
.plt.got section here.
(elf_i386_check_relocs): Don't create the .plt.got section.
* elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
the .plt.got and .plt.bnd sections here.
(elf_x86_64_check_relocs): Don't create the .plt.got nor
.plt.bnd sections.

ld/

* testsuite/ld-x86-64/pr21038a.d: Update DW_CFA_nop paddings
in .eh_frame section.
* testsuite/ld-x86-64/pr21038c.d: Update .eh_frame order.
bfd/ChangeLog
bfd/elf32-i386.c
bfd/elf64-x86-64.c
ld/ChangeLog
ld/testsuite/ld-x86-64/pr21038a.d
ld/testsuite/ld-x86-64/pr21038c.d
This page took 0.037745 seconds and 4 git commands to generate.