OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gdb-6.8/] [bfd/] [reloc.c] - Diff between revs 157 and 225

Show entire file | Details | Blame | View Log

Rev 157 Rev 225
Line 1... Line 1...
/* BFD support for handling relocation entries.
/* BFD support for handling relocation entries.
   Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
   Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
   Free Software Foundation, Inc.
   Free Software Foundation, Inc.
   Written by Cygnus Support.
   Written by Cygnus Support.
 
 
   This file is part of BFD, the Binary File Descriptor library.
   This file is part of BFD, the Binary File Descriptor library.
 
 
Line 1732... Line 1732...
  BFD_RELOC_68K_GLOB_DAT
  BFD_RELOC_68K_GLOB_DAT
ENUMX
ENUMX
  BFD_RELOC_68K_JMP_SLOT
  BFD_RELOC_68K_JMP_SLOT
ENUMX
ENUMX
  BFD_RELOC_68K_RELATIVE
  BFD_RELOC_68K_RELATIVE
 
ENUMX
 
  BFD_RELOC_68K_TLS_GD32
 
ENUMX
 
  BFD_RELOC_68K_TLS_GD16
 
ENUMX
 
  BFD_RELOC_68K_TLS_GD8
 
ENUMX
 
  BFD_RELOC_68K_TLS_LDM32
 
ENUMX
 
  BFD_RELOC_68K_TLS_LDM16
 
ENUMX
 
  BFD_RELOC_68K_TLS_LDM8
 
ENUMX
 
  BFD_RELOC_68K_TLS_LDO32
 
ENUMX
 
  BFD_RELOC_68K_TLS_LDO16
 
ENUMX
 
  BFD_RELOC_68K_TLS_LDO8
 
ENUMX
 
  BFD_RELOC_68K_TLS_IE32
 
ENUMX
 
  BFD_RELOC_68K_TLS_IE16
 
ENUMX
 
  BFD_RELOC_68K_TLS_IE8
 
ENUMX
 
  BFD_RELOC_68K_TLS_LE32
 
ENUMX
 
  BFD_RELOC_68K_TLS_LE16
 
ENUMX
 
  BFD_RELOC_68K_TLS_LE8
ENUMDOC
ENUMDOC
  Relocations used by 68K ELF.
  Relocations used by 68K ELF.
 
 
ENUM
ENUM
  BFD_RELOC_32_BASEREL
  BFD_RELOC_32_BASEREL
Line 1763... Line 1793...
  BFD_RELOC_32_PCREL_S2
  BFD_RELOC_32_PCREL_S2
ENUMX
ENUMX
  BFD_RELOC_16_PCREL_S2
  BFD_RELOC_16_PCREL_S2
ENUMX
ENUMX
  BFD_RELOC_23_PCREL_S2
  BFD_RELOC_23_PCREL_S2
 
ENUMX
 
  BFD_RELOC_28_PCREL_S2
ENUMDOC
ENUMDOC
  These PC-relative relocations are stored as word displacements --
  These PC-relative relocations are stored as word displacements --
i.e., byte displacements shifted right two bits.  The 30-bit word
i.e., byte displacements shifted right two bits.  The 30-bit word
displacement (<<32_PCREL_S2>> -- 32 bits, shifted 2) is used on the
displacement (<<32_PCREL_S2>> -- 32 bits, shifted 2) is used on the
SPARC.  (SPARC tools generally refer to this as <<WDISP30>>.)  The
SPARC.  (SPARC tools generally refer to this as <<WDISP30>>.)  The
signed 16-bit displacement is used on the MIPS, and the 23-bit
signed 16-bit displacement is used on the MIPS, the 23-bit
displacement is used on the Alpha.
displacement is used on the Alpha and the 28-bit displacement is used
 
on OpenRISC.
 
 
ENUM
ENUM
  BFD_RELOC_HI22
  BFD_RELOC_HI22
ENUMX
ENUMX
  BFD_RELOC_LO10
  BFD_RELOC_LO10
Line 1828... Line 1861...
  BFD_RELOC_SPARC_UA16
  BFD_RELOC_SPARC_UA16
ENUMX
ENUMX
  BFD_RELOC_SPARC_UA32
  BFD_RELOC_SPARC_UA32
ENUMX
ENUMX
  BFD_RELOC_SPARC_UA64
  BFD_RELOC_SPARC_UA64
 
ENUMX
 
  BFD_RELOC_SPARC_GOTDATA_HIX22
 
ENUMX
 
  BFD_RELOC_SPARC_GOTDATA_LOX10
 
ENUMX
 
  BFD_RELOC_SPARC_GOTDATA_OP_HIX22
 
ENUMX
 
  BFD_RELOC_SPARC_GOTDATA_OP_LOX10
 
ENUMX
 
  BFD_RELOC_SPARC_GOTDATA_OP
ENUMDOC
ENUMDOC
  SPARC ELF relocations.  There is probably some overlap with other
  SPARC ELF relocations.  There is probably some overlap with other
  relocation types already defined.
  relocation types already defined.
 
 
ENUM
ENUM
Line 1975... Line 2018...
  BFD_RELOC_SPU_HI16
  BFD_RELOC_SPU_HI16
ENUMX
ENUMX
  BFD_RELOC_SPU_PPU32
  BFD_RELOC_SPU_PPU32
ENUMX
ENUMX
  BFD_RELOC_SPU_PPU64
  BFD_RELOC_SPU_PPU64
 
ENUMX
 
  BFD_RELOC_SPU_ADD_PIC
ENUMDOC
ENUMDOC
  SPU Relocations.
  SPU Relocations.
 
 
ENUM
ENUM
  BFD_RELOC_ALPHA_GPDISP_HI16
  BFD_RELOC_ALPHA_GPDISP_HI16
Line 2068... Line 2113...
  Like BFD_RELOC_23_PCREL_S2, except that the source and target must
  Like BFD_RELOC_23_PCREL_S2, except that the source and target must
  share a common GP, and the target address is adjusted for
  share a common GP, and the target address is adjusted for
  STO_ALPHA_STD_GPLOAD.
  STO_ALPHA_STD_GPLOAD.
 
 
ENUM
ENUM
 
  BFD_RELOC_ALPHA_NOP
 
ENUMDOC
 
  The NOP relocation outputs a NOP if the longword displacement
 
     between two procedure entry points is < 2^21.
 
 
 
ENUM
 
  BFD_RELOC_ALPHA_BSR
 
ENUMDOC
 
  The BSR relocation outputs a BSR if the longword displacement
 
     between two procedure entry points is < 2^21.
 
 
 
ENUM
 
  BFD_RELOC_ALPHA_LDA
 
ENUMDOC
 
  The LDA relocation outputs a LDA if the longword displacement
 
     between two procedure entry points is < 2^16.
 
 
 
ENUM
 
  BFD_RELOC_ALPHA_BOH
 
ENUMDOC
 
  The BOH relocation outputs a BSR if the longword displacement
 
     between two procedure entry points is < 2^21, or else a hint.
 
 
 
ENUM
  BFD_RELOC_ALPHA_TLSGD
  BFD_RELOC_ALPHA_TLSGD
ENUMX
ENUMX
  BFD_RELOC_ALPHA_TLSLDM
  BFD_RELOC_ALPHA_TLSLDM
ENUMX
ENUMX
  BFD_RELOC_ALPHA_DTPMOD64
  BFD_RELOC_ALPHA_DTPMOD64
Line 2142... Line 2211...
  BFD_RELOC_LO16_PCREL
  BFD_RELOC_LO16_PCREL
ENUMDOC
ENUMDOC
  Low 16 bits of pc-relative value
  Low 16 bits of pc-relative value
 
 
ENUM
ENUM
 
  BFD_RELOC_MIPS16_GOT16
 
ENUMX
 
  BFD_RELOC_MIPS16_CALL16
 
ENUMDOC
 
  Equivalent of BFD_RELOC_MIPS_*, but with the MIPS16 layout of
 
     16-bit immediate fields
 
ENUM
  BFD_RELOC_MIPS16_HI16
  BFD_RELOC_MIPS16_HI16
ENUMDOC
ENUMDOC
  MIPS16 high 16 bits of 32-bit value.
  MIPS16 high 16 bits of 32-bit value.
ENUM
ENUM
  BFD_RELOC_MIPS16_HI16_S
  BFD_RELOC_MIPS16_HI16_S
Line 2239... Line 2315...
ENUM
ENUM
  BFD_RELOC_MIPS_COPY
  BFD_RELOC_MIPS_COPY
ENUMX
ENUMX
  BFD_RELOC_MIPS_JUMP_SLOT
  BFD_RELOC_MIPS_JUMP_SLOT
ENUMDOC
ENUMDOC
  MIPS ELF relocations (VxWorks extensions).
  MIPS ELF relocations (VxWorks and PLT extensions).
 
COMMENT
 
 
 
ENUM
 
  BFD_RELOC_MOXIE_10_PCREL
 
ENUMDOC
 
  Moxie ELF relocations.
COMMENT
COMMENT
 
 
ENUM
ENUM
  BFD_RELOC_FRV_LABEL16
  BFD_RELOC_FRV_LABEL16
ENUMX
ENUMX
Line 2419... Line 2501...
  BFD_RELOC_386_TLS_GOTDESC
  BFD_RELOC_386_TLS_GOTDESC
ENUMX
ENUMX
  BFD_RELOC_386_TLS_DESC_CALL
  BFD_RELOC_386_TLS_DESC_CALL
ENUMX
ENUMX
  BFD_RELOC_386_TLS_DESC
  BFD_RELOC_386_TLS_DESC
 
ENUMX
 
  BFD_RELOC_386_IRELATIVE
ENUMDOC
ENUMDOC
  i386/elf relocations
  i386/elf relocations
 
 
ENUM
ENUM
  BFD_RELOC_X86_64_GOT32
  BFD_RELOC_X86_64_GOT32
Line 2474... Line 2558...
  BFD_RELOC_X86_64_GOTPC32_TLSDESC
  BFD_RELOC_X86_64_GOTPC32_TLSDESC
ENUMX
ENUMX
  BFD_RELOC_X86_64_TLSDESC_CALL
  BFD_RELOC_X86_64_TLSDESC_CALL
ENUMX
ENUMX
  BFD_RELOC_X86_64_TLSDESC
  BFD_RELOC_X86_64_TLSDESC
 
ENUMX
 
  BFD_RELOC_X86_64_IRELATIVE
ENUMDOC
ENUMDOC
  x86-64/elf relocations
  x86-64/elf relocations
 
 
ENUM
ENUM
  BFD_RELOC_NS32K_IMM_8
  BFD_RELOC_NS32K_IMM_8
Line 2638... Line 2724...
  Power(rs6000) and PowerPC relocations.
  Power(rs6000) and PowerPC relocations.
 
 
ENUM
ENUM
  BFD_RELOC_PPC_TLS
  BFD_RELOC_PPC_TLS
ENUMX
ENUMX
 
  BFD_RELOC_PPC_TLSGD
 
ENUMX
 
  BFD_RELOC_PPC_TLSLD
 
ENUMX
  BFD_RELOC_PPC_DTPMOD
  BFD_RELOC_PPC_DTPMOD
ENUMX
ENUMX
  BFD_RELOC_PPC_TPREL16
  BFD_RELOC_PPC_TPREL16
ENUMX
ENUMX
  BFD_RELOC_PPC_TPREL16_LO
  BFD_RELOC_PPC_TPREL16_LO
Line 4122... Line 4212...
  BFD_RELOC_390_TLS_GOTIE20
  BFD_RELOC_390_TLS_GOTIE20
ENUMDOC
ENUMDOC
  Long displacement extension.
  Long displacement extension.
 
 
ENUM
ENUM
  BFD_RELOC_SCORE_DUMMY1
 
ENUMDOC
 
  Score relocations
 
ENUM
 
  BFD_RELOC_SCORE_GPREL15
  BFD_RELOC_SCORE_GPREL15
ENUMDOC
ENUMDOC
 
  Score relocations
  Low 16 bit for load/store
  Low 16 bit for load/store
ENUM
ENUM
  BFD_RELOC_SCORE_DUMMY2
  BFD_RELOC_SCORE_DUMMY2
ENUMX
ENUMX
  BFD_RELOC_SCORE_JMP
  BFD_RELOC_SCORE_JMP
Line 4140... Line 4227...
ENUM
ENUM
  BFD_RELOC_SCORE_BRANCH
  BFD_RELOC_SCORE_BRANCH
ENUMDOC
ENUMDOC
  This is a 19-bit reloc with the right 1 bit assumed to be 0
  This is a 19-bit reloc with the right 1 bit assumed to be 0
ENUM
ENUM
 
  BFD_RELOC_SCORE_IMM30
 
ENUMDOC
 
  This is a 32-bit reloc for 48-bit instructions.
 
ENUM
 
  BFD_RELOC_SCORE_IMM32
 
ENUMDOC
 
  This is a 32-bit reloc for 48-bit instructions.
 
ENUM
  BFD_RELOC_SCORE16_JMP
  BFD_RELOC_SCORE16_JMP
ENUMDOC
ENUMDOC
  This is a 11-bit reloc with the right 1 bit assumed to be 0
  This is a 11-bit reloc with the right 1 bit assumed to be 0
ENUM
ENUM
  BFD_RELOC_SCORE16_BRANCH
  BFD_RELOC_SCORE16_BRANCH
ENUMDOC
ENUMDOC
  This is a 8-bit reloc with the right 1 bit assumed to be 0
  This is a 8-bit reloc with the right 1 bit assumed to be 0
ENUM
ENUM
 
  BFD_RELOC_SCORE_BCMP
 
ENUMDOC
 
   This is a 9-bit reloc with the right 1 bit assumed to be 0
 
ENUM
  BFD_RELOC_SCORE_GOT15
  BFD_RELOC_SCORE_GOT15
ENUMX
ENUMX
  BFD_RELOC_SCORE_GOT_LO16
  BFD_RELOC_SCORE_GOT_LO16
ENUMX
ENUMX
  BFD_RELOC_SCORE_CALL15
  BFD_RELOC_SCORE_CALL15
Line 4591... Line 4690...
  BFD_RELOC_CR16_SWITCH8
  BFD_RELOC_CR16_SWITCH8
ENUMX
ENUMX
  BFD_RELOC_CR16_SWITCH16
  BFD_RELOC_CR16_SWITCH16
ENUMX
ENUMX
  BFD_RELOC_CR16_SWITCH32
  BFD_RELOC_CR16_SWITCH32
 
ENUMX
 
  BFD_RELOC_CR16_GOT_REGREL20
 
ENUMX
 
  BFD_RELOC_CR16_GOTC_REGREL20
 
ENUMX
 
  BFD_RELOC_CR16_GLOB_DAT
ENUMDOC
ENUMDOC
  NS CR16 Relocations.
  NS CR16 Relocations.
 
 
ENUM
ENUM
  BFD_RELOC_CRX_REL4
  BFD_RELOC_CRX_REL4
Line 4700... Line 4805...
  BFD_RELOC_CRIS_32_PLT_PCREL
  BFD_RELOC_CRIS_32_PLT_PCREL
ENUMDOC
ENUMDOC
  32-bit offset to symbol with PLT entry, relative to this relocation.
  32-bit offset to symbol with PLT entry, relative to this relocation.
 
 
ENUM
ENUM
 
  BFD_RELOC_CRIS_32_GOT_GD
 
ENUMX
 
  BFD_RELOC_CRIS_16_GOT_GD
 
ENUMX
 
  BFD_RELOC_CRIS_32_GD
 
ENUMX
 
  BFD_RELOC_CRIS_DTP
 
ENUMX
 
  BFD_RELOC_CRIS_32_DTPREL
 
ENUMX
 
  BFD_RELOC_CRIS_16_DTPREL
 
ENUMX
 
  BFD_RELOC_CRIS_32_GOT_TPREL
 
ENUMX
 
  BFD_RELOC_CRIS_16_GOT_TPREL
 
ENUMX
 
  BFD_RELOC_CRIS_32_TPREL
 
ENUMX
 
  BFD_RELOC_CRIS_16_TPREL
 
ENUMX
 
  BFD_RELOC_CRIS_DTPMOD
 
ENUMX
 
  BFD_RELOC_CRIS_32_IE
 
ENUMDOC
 
  Relocs used in TLS code for CRIS.
 
 
 
ENUM
  BFD_RELOC_860_COPY
  BFD_RELOC_860_COPY
ENUMX
ENUMX
  BFD_RELOC_860_GLOB_DAT
  BFD_RELOC_860_GLOB_DAT
ENUMX
ENUMX
  BFD_RELOC_860_JUMP_SLOT
  BFD_RELOC_860_JUMP_SLOT
Line 4996... Line 5128...
ENUMDOC
ENUMDOC
  Xtensa relocation to mark that the linker should simplify
  Xtensa relocation to mark that the linker should simplify
  assembler-expanded instructions.  This is commonly used
  assembler-expanded instructions.  This is commonly used
  internally by the linker after analysis of a
  internally by the linker after analysis of a
  BFD_RELOC_XTENSA_ASM_EXPAND.
  BFD_RELOC_XTENSA_ASM_EXPAND.
 
ENUM
 
  BFD_RELOC_XTENSA_TLSDESC_FN
 
ENUMX
 
  BFD_RELOC_XTENSA_TLSDESC_ARG
 
ENUMX
 
  BFD_RELOC_XTENSA_TLS_DTPOFF
 
ENUMX
 
  BFD_RELOC_XTENSA_TLS_TPOFF
 
ENUMX
 
  BFD_RELOC_XTENSA_TLS_FUNC
 
ENUMX
 
  BFD_RELOC_XTENSA_TLS_ARG
 
ENUMX
 
  BFD_RELOC_XTENSA_TLS_CALL
 
ENUMDOC
 
  Xtensa TLS relocations.
 
 
ENUM
ENUM
  BFD_RELOC_Z80_DISP8
  BFD_RELOC_Z80_DISP8
ENUMDOC
ENUMDOC
  8 bit signed offset in (ix+d) or (iy+d).
  8 bit signed offset in (ix+d) or (iy+d).
Line 5015... Line 5163...
ENUM
ENUM
  BFD_RELOC_Z8K_IMM4L
  BFD_RELOC_Z8K_IMM4L
ENUMDOC
ENUMDOC
  4 bit value.
  4 bit value.
 
 
 
ENUM
 
   BFD_RELOC_LM32_CALL
 
ENUMX
 
   BFD_RELOC_LM32_BRANCH
 
ENUMX
 
   BFD_RELOC_LM32_16_GOT
 
ENUMX
 
   BFD_RELOC_LM32_GOTOFF_HI16
 
ENUMX
 
   BFD_RELOC_LM32_GOTOFF_LO16
 
ENUMX
 
   BFD_RELOC_LM32_COPY
 
ENUMX
 
   BFD_RELOC_LM32_GLOB_DAT
 
ENUMX
 
   BFD_RELOC_LM32_JMP_SLOT
 
ENUMX
 
   BFD_RELOC_LM32_RELATIVE
 
ENUMDOC
 
 Lattice Mico32 relocations.
 
 
 
ENUM
 
   BFD_RELOC_MACH_O_SECTDIFF
 
ENUMDOC
 
   Difference between two section addreses.  Must be followed by a
 
   BFD_RELOC_MACH_O_PAIR.
 
ENUM
 
   BFD_RELOC_MACH_O_PAIR
 
ENUMDOC
 
 Mach-O generic relocations.
 
 
 
ENUM
 
  BFD_RELOC_MICROBLAZE_32_LO
 
ENUMDOC
 
  This is a 32 bit reloc for the microblaze that stores the
 
  low 16 bits of a value
 
ENUM
 
  BFD_RELOC_MICROBLAZE_32_LO_PCREL
 
ENUMDOC
 
  This is a 32 bit pc-relative reloc for the microblaze that
 
  stores the low 16 bits of a value
 
ENUM
 
  BFD_RELOC_MICROBLAZE_32_ROSDA
 
ENUMDOC
 
  This is a 32 bit reloc for the microblaze that stores a
 
  value relative to the read-only small data area anchor
 
ENUM
 
  BFD_RELOC_MICROBLAZE_32_RWSDA
 
ENUMDOC
 
  This is a 32 bit reloc for the microblaze that stores a
 
  value relative to the read-write small data area anchor
 
ENUM
 
  BFD_RELOC_MICROBLAZE_32_SYM_OP_SYM
 
ENUMDOC
 
  This is a 32 bit reloc for the microblaze to handle
 
  expressions of the form "Symbol Op Symbol"
 
ENUM
 
  BFD_RELOC_MICROBLAZE_64_NONE
 
ENUMDOC
 
  This is a 64 bit reloc that stores the 32 bit pc relative
 
  value in two words (with an imm instruction).  No relocation is
 
  done here - only used for relaxing
 
ENUM
 
  BFD_RELOC_MICROBLAZE_64_GOTPC
 
ENUMDOC
 
  This is a 64 bit reloc that stores the 32 bit pc relative
 
  value in two words (with an imm instruction).  The relocation is
 
  PC-relative GOT offset
 
ENUM
 
  BFD_RELOC_MICROBLAZE_64_GOT
 
ENUMDOC
 
  This is a 64 bit reloc that stores the 32 bit pc relative
 
  value in two words (with an imm instruction).  The relocation is
 
  GOT offset
 
ENUM
 
  BFD_RELOC_MICROBLAZE_64_PLT
 
ENUMDOC
 
  This is a 64 bit reloc that stores the 32 bit pc relative
 
  value in two words (with an imm instruction).  The relocation is
 
  PC-relative offset into PLT
 
ENUM
 
  BFD_RELOC_MICROBLAZE_64_GOTOFF
 
ENUMDOC
 
  This is a 64 bit reloc that stores the 32 bit GOT relative
 
  value in two words (with an imm instruction).  The relocation is
 
  relative offset from _GLOBAL_OFFSET_TABLE_
 
ENUM
 
  BFD_RELOC_MICROBLAZE_32_GOTOFF
 
ENUMDOC
 
  This is a 32 bit reloc that stores the 32 bit GOT relative
 
  value in a word.  The relocation is relative offset from
 
  _GLOBAL_OFFSET_TABLE_
 
ENUM
 
  BFD_RELOC_MICROBLAZE_COPY
 
ENUMDOC
 
  This is used to tell the dynamic linker to copy the value out of
 
  the dynamic object into the runtime process image.
 
 
 
 
ENDSENUM
ENDSENUM
  BFD_RELOC_UNUSED
  BFD_RELOC_UNUSED
CODE_FRAGMENT
CODE_FRAGMENT
.
.
.typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
.typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
Line 5135... Line 5382...
bfd_generic_relax_section (bfd *abfd ATTRIBUTE_UNUSED,
bfd_generic_relax_section (bfd *abfd ATTRIBUTE_UNUSED,
                           asection *section ATTRIBUTE_UNUSED,
                           asection *section ATTRIBUTE_UNUSED,
                           struct bfd_link_info *link_info ATTRIBUTE_UNUSED,
                           struct bfd_link_info *link_info ATTRIBUTE_UNUSED,
                           bfd_boolean *again)
                           bfd_boolean *again)
{
{
 
  if (link_info->relocatable)
 
    (*link_info->callbacks->einfo)
 
      (_("%P%F: --relax and -r may not be used together\n"));
 
 
  *again = FALSE;
  *again = FALSE;
  return TRUE;
  return TRUE;
}
}
 
 
/*
/*
Line 5225... Line 5476...
    return NULL;
    return NULL;
 
 
  if (reloc_size == 0)
  if (reloc_size == 0)
    return data;
    return data;
 
 
  reloc_vector = bfd_malloc (reloc_size);
  reloc_vector = (arelent **) bfd_malloc (reloc_size);
  if (reloc_vector == NULL)
  if (reloc_vector == NULL)
    return NULL;
    return NULL;
 
 
  reloc_count = bfd_canonicalize_reloc (input_bfd,
  reloc_count = bfd_canonicalize_reloc (input_bfd,
                                        input_section,
                                        input_section,

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.