d6ab8113e3
2005-06-17 Jan Beulich <jbeulich@novell.com> * bfd-in2.h (elf_x86_64_reloc_type): Add BFD_RELOC_X86_64_GOTOFF64 and BFD_RELOC_X86_64_GOTPC32. * libbfd.h (bfd_reloc_code_real_names): Likewise. * elf64-x86-64.c (x86_64_elf_howto_table): Add entries for R_X86_64_PC64, R_X86_64_GOTOFF64, and R_X86_64_GOTPC32. (x86_64_reloc_map): Add entries for R_X86_64_PC64, R_X86_64_GOTOFF64, and R_X86_64_GOTPC32. (elf64_x86_64_info_to_howto): Adjust bounding relocation type. (elf64_x86_64_check_relocs): Also handle R_X86_64_PC64, R_X86_64_GOTOFF64, and R_X86_64_GOTPC32. (elf64_x86_64_relocate_section): Likewise. (elf64_x86_64_gc_sweep_hook): Also handle R_X86_64_PC64. gas/ 2005-06-17 Jan Beulich <jbeulich@novell.com> * config/tc-i386.c (reloc): Also handle BFD_RELOC_64_PCREL. (tc_i386_fix_adjustable): Include BFD_RELOC_X86_64_GOTOFF64, BFD_RELOC_X86_64_DTPOFF64, and BFD_RELOC_X86_64_TPOFF64. (output_disp): Do GOTPC conversion also for BFD_RELOC_X86_64_32S and BFD_RELOC_32_PCREL. Use BFD_RELOC_X86_64_GOTPC32 instead of aborting. (output_imm): Do GOTPC conversion also for BFD_RELOC_X86_64_32S. Use BFD_RELOC_X86_64_GOTPC32 instead of aborting. (tc_gen_reloc): Do GOTPC conversion also for BFD_RELOC_32_PCREL. Use BFD_RELOC_X86_64_GOTPC32 instead of aborting. Also handle BFD_RELOC_X86_64_GOTOFF64, BFD_RELOC_X86_64_GOTPC32, BFD_RELOC_X86_64_DTPOFF64, and BFD_RELOC_X86_64_TPOFF64. Also convert 8-byte pc-relative relocations. (lex_got): Use BFD_RELOC_X86_64_GOTOFF64 for 64-bit @gotoff. (i386_validate_fix): Likewise. (x86_cons): Also handle quad values in 64-bit mode. (i386_displacement): Also handle BFD_RELOC_X86_64_GOTOFF64. (md_apply_fix): Include BFD_RELOC_X86_64_DTPOFF64 and BFD_RELOC_X86_64_TPOFF64 in the TLS check. Also convert BFD_RELOC_64 to pc-relative variant. Also check for BFD_RELOC_64_PCREL. gas/testsuite/ 2005-06-17 Jan Beulich <jbeulich@novell.com> * gas/i386/x86-64-pcrel.s: Add insn requiring 64-bit pc-relative relocation. Add insns for all widths of non-pc-relative relocations. * gas/i386/x86-64-pcrel.d: Adjust. include/elf/ 2005-06-17 Jan Beulich <jbeulich@novell.com> * x86-64.h (elf_x86_64_reloc_type): Adjust comment for R_X86_64_GOTPCREL. Add R_X86_64_PC64, R_X86_64_GOTOFF64, and R_X86_64_GOTPC32.
65 lines
3.5 KiB
C
65 lines
3.5 KiB
C
/* x86_64 ELF support for BFD.
|
|
Copyright (C) 2000, 2001, 2002, 2004 Free Software Foundation, Inc.
|
|
Contributed by Jan Hubicka <jh@suse.cz>
|
|
|
|
This file is part of BFD, the Binary File Descriptor library.
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program; if not, write to the Free Software Foundation,
|
|
Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
|
|
|
#ifndef _ELF_X86_64_H
|
|
#define _ELF_X86_64_H
|
|
|
|
#include "elf/reloc-macros.h"
|
|
|
|
START_RELOC_NUMBERS (elf_x86_64_reloc_type)
|
|
RELOC_NUMBER (R_X86_64_NONE, 0) /* No reloc */
|
|
RELOC_NUMBER (R_X86_64_64, 1) /* Direct 64 bit */
|
|
RELOC_NUMBER (R_X86_64_PC32, 2) /* PC relative 32 bit signed */
|
|
RELOC_NUMBER (R_X86_64_GOT32, 3) /* 32 bit GOT entry */
|
|
RELOC_NUMBER (R_X86_64_PLT32, 4) /* 32 bit PLT address */
|
|
RELOC_NUMBER (R_X86_64_COPY, 5) /* Copy symbol at runtime */
|
|
RELOC_NUMBER (R_X86_64_GLOB_DAT, 6) /* Create GOT entry */
|
|
RELOC_NUMBER (R_X86_64_JUMP_SLOT,7) /* Create PLT entry */
|
|
RELOC_NUMBER (R_X86_64_RELATIVE, 8) /* Adjust by program base */
|
|
RELOC_NUMBER (R_X86_64_GOTPCREL, 9) /* 32 bit signed pc relative
|
|
offset to GOT entry */
|
|
RELOC_NUMBER (R_X86_64_32, 10) /* Direct 32 bit zero extended */
|
|
RELOC_NUMBER (R_X86_64_32S, 11) /* Direct 32 bit sign extended */
|
|
RELOC_NUMBER (R_X86_64_16, 12) /* Direct 16 bit zero extended */
|
|
RELOC_NUMBER (R_X86_64_PC16, 13) /* 16 bit sign extended pc relative*/
|
|
RELOC_NUMBER (R_X86_64_8, 14) /* Direct 8 bit sign extended */
|
|
RELOC_NUMBER (R_X86_64_PC8, 15) /* 8 bit sign extended pc relative*/
|
|
RELOC_NUMBER (R_X86_64_DTPMOD64, 16) /* ID of module containing symbol */
|
|
RELOC_NUMBER (R_X86_64_DTPOFF64, 17) /* Offset in TLS block */
|
|
RELOC_NUMBER (R_X86_64_TPOFF64, 18) /* Offset in initial TLS block */
|
|
RELOC_NUMBER (R_X86_64_TLSGD, 19) /* PC relative offset to GD GOT block */
|
|
RELOC_NUMBER (R_X86_64_TLSLD, 20) /* PC relative offset to LD GOT block */
|
|
RELOC_NUMBER (R_X86_64_DTPOFF32, 21) /* Offset in TLS block */
|
|
RELOC_NUMBER (R_X86_64_GOTTPOFF, 22) /* PC relative offset to IE GOT entry */
|
|
RELOC_NUMBER (R_X86_64_TPOFF32, 23) /* Offset in initial TLS block */
|
|
RELOC_NUMBER (R_X86_64_PC64, 24) /* PC relative 64 bit */
|
|
RELOC_NUMBER (R_X86_64_GOTOFF64, 25) /* 64 bit offset to GOT */
|
|
RELOC_NUMBER (R_X86_64_GOTPC32, 26) /* 32 bit signed pc relative
|
|
offset to GOT */
|
|
RELOC_NUMBER (R_X86_64_GNU_VTINHERIT, 250) /* GNU C++ hack */
|
|
RELOC_NUMBER (R_X86_64_GNU_VTENTRY, 251) /* GNU C++ hack */
|
|
END_RELOC_NUMBERS (R_X86_64_max)
|
|
|
|
/* Processor specific section types. */
|
|
|
|
#define SHT_X86_64_UNWIND 0x70000001 /* unwind information */
|
|
|
|
#endif
|