x86: Add NEED_DYNAMIC_RELOCATION_P
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 6 Oct 2017 07:21:48 +0000 (00:21 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 6 Oct 2017 07:23:00 +0000 (00:23 -0700)
commitdaf1c414a48baf090f005ce4b319b6881d5d6872
tree3813ba5466b90157df7f6ca27b1beb706b0f0902
parent51537393bd939e79f6e9291629fb65a17e6f19da
x86: Add NEED_DYNAMIC_RELOCATION_P

Add NEED_DYNAMIC_RELOCATION_P which returns TRUE if dynamic relocation
is needed.

* elf32-i386.c (X86_PCREL_TYPE_P): New.
(elf_i386_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
* elf64-x86-64.c (IS_X86_64_PCREL_TYPE): Renamed to ...
(X86_PCREL_TYPE_P): This.
(elf_x86_64_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
Replace IS_X86_64_PCREL_TYPE with X86_PCREL_TYPE_P.
(elf_x86_64_relocate_section): Replace IS_X86_64_PCREL_TYPE with
X86_PCREL_TYPE_P.
* elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): New.
bfd/ChangeLog
bfd/elf32-i386.c
bfd/elf64-x86-64.c
bfd/elfxx-x86.h