]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - ld/ldlang.c
Move ELF relocation check after lang_gc_sections
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 21 Apr 2016 00:06:58 +0000 (17:06 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 21 Apr 2016 00:08:55 +0000 (17:08 -0700)
commitfbf05aa70d7a6ad3dd92ca718faa4bb383b975ee
tree97f3ad2521a068913cf8e0aaafea1747fecf4f0e
parent1a7272c0f9080ca18a724c91ab37a10fa45ad9e4
Move ELF relocation check after lang_gc_sections

Move ELF relocation check after lang_gc_sections so that all the
reference counting code for plt and got relocs can be removed.  This
only affects ELF targets which check relocations after opening all
input file.

* ldlang.c (lang_check_relocs): New function.
(lang_process): Call lang_check_relocs after lang_gc_sections.
* emultempl/elf32.em (gld${EMULATION_NAME}_before_parse): Don't
call _bfd_elf_link_check_relocs here.
ld/ChangeLog
ld/emultempl/elf32.em
ld/ldlang.c