Add x86 size relocation support to bfd
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 16 Jan 2013 21:34:46 +0000 (21:34 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 16 Jan 2013 21:34:46 +0000 (21:34 +0000)
commit1788fc08f7a091f246a41cd14d2b612d4253e55b
treea37e3ac15f14e718ac1248bc5eb66a5ade07d527
parente1ec603fec5191034dd56f4e417c89054b5f61b9
Add x86 size relocation support to bfd

* bfd-in2.h: Regenerated.
* libbfd.h: Likewise.

* elf32-i386.c (elf_howto_table): Fill R_386_SIZE32 entry.
(elf_i386_reloc_type_lookup): Support BFD_RELOC_SIZE32.
(elf_i386_check_relocs): Handle R_386_SIZE32.
(elf_i386_gc_sweep_hook): Likewise.
(elf_i386_relocate_section): Likewise.

* elf64-x86-64.c (x86_64_elf_howto_table): Fill R_X86_64_SIZE32
and R_X86_64_SIZE64 entries.
(x86_64_reloc_map): Add BFD_RELOC_SIZE32 and BFD_RELOC_SIZE64,
(elf_x86_64_rtype_to_howto): Handle R_X86_64_SIZE32 for x32.
(elf_x86_64_reloc_name_lookup): Likewise.
(elf_x86_64_check_relocs): Handle R_X86_64_SIZE32 and
R_X86_64_SIZE64.
(elf_x86_64_gc_sweep_hook): Likewise.
(elf_x86_64_relocate_section): Likewise.

* reloc.c (bfd_reloc_code_type): Add BFD_RELOC_SIZE32 and
BFD_RELOC_SIZE64.
bfd/ChangeLog
bfd/bfd-in2.h
bfd/elf32-i386.c
bfd/elf64-x86-64.c
bfd/libbfd.h
bfd/reloc.c