]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - bfd/elf64-ppc.c
Prepare powerpc64 for late check_relocs
authorAlan Modra <amodra@gmail.com>
Tue, 10 Oct 2017 01:22:06 +0000 (11:52 +1030)
committerAlan Modra <amodra@gmail.com>
Tue, 10 Oct 2017 04:16:07 +0000 (14:46 +1030)
commitb9399fcf4ec90d898a610e39bd9141e85c008fbb
treef88ad58dc656f94f789daf1e3f49b1476e6b43a7
parentcbd3b1c155ed4f4986bf50754b1c57ad85700f7c
Prepare powerpc64 for late check_relocs

check_relocs was setting up some data used by the --gc-sections
gc_mark_hook.  If we change ld to run check_relocs after gc_sections
that data needs to be set up elsewhere.  Done by this patch in the
backend check_directives function (ppc64_elf_before_check_relocs).

* elf64-ppc.c (ppc64_elf_before_check_relocs): Set sec_type for
.opd whenever .opd is present and non-zero size.  Move code
setting abiversion to/from output file earlier.  Only set
u.opd.func_sec when --gc-sections.  Read relocs and set up
u.opd.func_sec values here..
(ppc64_elf_check_relocs): ..rather than here.  Simplify opd
section tests.
(ppc64_elf_edit_opd): Don't set sec_type for .opd here.
bfd/ChangeLog
bfd/elf64-ppc.c