]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - bfd/elf64-x86-64.c
Cache the section contents in x86 check_relocs
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 5 May 2016 11:11:57 +0000 (04:11 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 5 May 2016 11:12:16 +0000 (04:12 -0700)
commitbedfd056d4d58a3ebaf8d396c8453f0d0468576f
treeadd4e0a699c7eee3cddd727c583a7a3b7d132005
parent9e78496443ec1525ee94c54249779639b4cded0b
Cache the section contents in x86 check_relocs

Cache the section contents in x86 check_relocs for sections without
TLS relocations.

* elf32-i386.c (elf_i386_check_tls_transition): Remove abfd.
Don't check if contents == NULL.
(elf_i386_tls_transition): Add from_relocate_section.  Check
from_relocate_section instead of contents != NULL.  Update
elf_i386_check_tls_transition call.
(elf_i386_check_relocs): Cache the section contents if
keep_memory is FALSE.  Pass FALSE as from_relocate_section to
elf_i386_tls_transition.
(elf_i386_relocate_section): Pass TRUE as from_relocate_section
to elf_i386_tls_transition.
(elf_backend_caches_rawsize): New.
* elf64-x86-64.c (elf_x86_64_check_tls_transition): Don't check
if contents == NULL.
(elf_x86_64_tls_transition): Add from_relocate_section.  Check
from_relocate_section instead of contents != NULL.
(elf_x86_64_check_relocs): Cache the section contents if
keep_memory is FALSE.  Pass FALSE as from_relocate_section to
elf_x86_64_tls_transition.
(elf_x86_64_relocate_section): Pass TRUE as from_relocate_section
to elf_x86_64_tls_transition.
(elf_backend_caches_rawsize): New.
bfd/ChangeLog
bfd/elf32-i386.c
bfd/elf64-x86-64.c