Define X86_PCREL_TYPE_P/X86_SIZE_TYPE_P in elfxx-x86.h
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 31 Dec 2021 14:49:19 +0000 (06:49 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 31 Dec 2021 15:02:41 +0000 (07:02 -0800)
commit831083d300c9e7f5a224df60c3a059725fb04882
treed251dc13573462c9d76d0518f3a210c416d6f5dd
parente5b10c4079279db9aa86225a3b4b4c30280c322e
Define X86_PCREL_TYPE_P/X86_SIZE_TYPE_P in elfxx-x86.h

* elf32-i386.c: Don't include "elf/i386.h".
(X86_PCREL_TYPE_P): Removed.
(X86_SIZE_TYPE_P): Likewise.
(elf_i386_check_relocs): Pass false to NEED_DYNAMIC_RELOCATION_P.
(elf_i386_relocate_section): Pass false to
GENERATE_DYNAMIC_RELOCATION_P and COPY_INPUT_RELOC_P.
* elf64-x86-64.c: Don't include "elf/x86-64.h".
(X86_PCREL_TYPE_P): Removed.
(X86_SIZE_TYPE_P): Likewise.
(elf_x86_64_check_relocs): Pass true to NEED_DYNAMIC_RELOCATION_P
and X86_PCREL_TYPE_P.
(elf_x86_64_relocate_section): Pass true to X86_PCREL_TYPE_P,
X86_SIZE_TYPE_P, GENERATE_DYNAMIC_RELOCATION_P and
COPY_INPUT_RELOC_P.
* elfxx-x86.c: Don't include "elf/i386.h" nor "elf/x86-64.h".
* elfxx-x86.h (X86_64_PCREL_TYPE_P): New.
(I386_PCREL_TYPE_P): Likewise.
(X86_PCREL_TYPE_P): Likewise.
(X86_64_SIZE_TYPE_P): Likewise.
(I386_SIZE_TYPE_P): Likewise.
(X86_SIZE_TYPE_P): Likewise.
(NEED_DYNAMIC_RELOCATION_P): Add IS_X86_64 and pass it to
X86_PCREL_TYPE_P.
(COPY_INPUT_RELOC_P): Likewise.
(GENERATE_DYNAMIC_RELOCATION_P): Add IS_X86_64, pass it to
X86_PCREL_TYPE_P and X86_SIZE_TYPE_P.
bfd/elf32-i386.c
bfd/elf64-x86-64.c
bfd/elfxx-x86.c
bfd/elfxx-x86.h