* elf32-cris.c (TLSHOWTO32, TLSHOWTO16): New macros.
(cris_elf_howto_table): Add entries for R_CRIS_32_GOT_GD, R_CRIS_16_GOT_GD, R_CRIS_32_GD, R_CRIS_DTP, R_CRIS_32_DTPREL, R_CRIS_16_DTPREL, R_CRIS_DTPMOD, R_CRIS_32_GOT_TPREL, R_CRIS_16_GOT_TPREL, R_CRIS_32_TPREL, R_CRIS_16_TPREL. (cris_reloc_map): Similarly. * reloc.c (bfd_reloc_code_type): Add entries for BFD_RELOC_CRIS_32_GOT_GD, BFD_RELOC_CRIS_16_GOT_GD, BFD_RELOC_CRIS_32_GD, BFD_RELOC_CRIS_DTP, BFD_RELOC_CRIS_32_DTPREL, BFD_RELOC_CRIS_16_DTPREL, BFD_RELOC_CRIS_DTPMOD, BFD_RELOC_CRIS_32_GOT_TPREL, BFD_RELOC_CRIS_16_GOT_TPREL, BFD_RELOC_CRIS_32_TPREL, BFD_RELOC_CRIS_16_TPREL. * libbfd.h, bfd-in2.h: Regenerate.
This commit is contained in:
parent
1d03769272
commit
3926fc5473
5 changed files with 103 additions and 2 deletions
|
@ -1,3 +1,20 @@
|
|||
2008-10-04 Hans-Peter Nilsson <hp@axis.com>
|
||||
|
||||
* elf32-cris.c (TLSHOWTO32, TLSHOWTO16): New macros.
|
||||
(cris_elf_howto_table): Add entries for R_CRIS_32_GOT_GD,
|
||||
R_CRIS_16_GOT_GD, R_CRIS_32_GD, R_CRIS_DTP, R_CRIS_32_DTPREL,
|
||||
R_CRIS_16_DTPREL, R_CRIS_DTPMOD, R_CRIS_32_GOT_TPREL,
|
||||
R_CRIS_16_GOT_TPREL, R_CRIS_32_TPREL, R_CRIS_16_TPREL.
|
||||
(cris_reloc_map): Similarly.
|
||||
* reloc.c (bfd_reloc_code_type): Add entries for
|
||||
BFD_RELOC_CRIS_32_GOT_GD, BFD_RELOC_CRIS_16_GOT_GD,
|
||||
BFD_RELOC_CRIS_32_GD, BFD_RELOC_CRIS_DTP,
|
||||
BFD_RELOC_CRIS_32_DTPREL, BFD_RELOC_CRIS_16_DTPREL,
|
||||
BFD_RELOC_CRIS_DTPMOD, BFD_RELOC_CRIS_32_GOT_TPREL,
|
||||
BFD_RELOC_CRIS_16_GOT_TPREL, BFD_RELOC_CRIS_32_TPREL,
|
||||
BFD_RELOC_CRIS_16_TPREL.
|
||||
* libbfd.h, bfd-in2.h: Regenerate.
|
||||
|
||||
2008-10-03 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
PR 6931
|
||||
|
|
|
@ -4192,6 +4192,19 @@ This is the 5 bits of a value. */
|
|||
/* 32-bit offset to symbol with PLT entry, relative to this relocation. */
|
||||
BFD_RELOC_CRIS_32_PLT_PCREL,
|
||||
|
||||
/* Relocs used in TLS code for CRIS. */
|
||||
BFD_RELOC_CRIS_32_GOT_GD,
|
||||
BFD_RELOC_CRIS_16_GOT_GD,
|
||||
BFD_RELOC_CRIS_32_GD,
|
||||
BFD_RELOC_CRIS_DTP,
|
||||
BFD_RELOC_CRIS_32_DTPREL,
|
||||
BFD_RELOC_CRIS_16_DTPREL,
|
||||
BFD_RELOC_CRIS_32_GOT_TPREL,
|
||||
BFD_RELOC_CRIS_16_GOT_TPREL,
|
||||
BFD_RELOC_CRIS_32_TPREL,
|
||||
BFD_RELOC_CRIS_16_TPREL,
|
||||
BFD_RELOC_CRIS_DTPMOD,
|
||||
|
||||
/* Intel i860 Relocations. */
|
||||
BFD_RELOC_860_COPY,
|
||||
BFD_RELOC_860_GLOB_DAT,
|
||||
|
|
|
@ -409,7 +409,31 @@ static reloc_howto_type cris_elf_howto_table [] =
|
|||
FALSE, /* partial_inplace */
|
||||
0, /* src_mask */
|
||||
0xffffffff, /* dst_mask */
|
||||
TRUE) /* pcrel_offset */
|
||||
TRUE), /* pcrel_offset */
|
||||
|
||||
/* We don't handle these in any special manner and cross-format
|
||||
linking is not supported; just recognize them enough to pass them
|
||||
around. FIXME: do the same for most PIC relocs and add sanity
|
||||
tests to actually refuse gracefully to handle these and PIC
|
||||
relocs for cross-format linking. */
|
||||
#define TLSHOWTO32(name) \
|
||||
HOWTO (name, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, \
|
||||
bfd_elf_generic_reloc, #name, FALSE, 0, 0xffffffff, FALSE)
|
||||
#define TLSHOWTO16(name) \
|
||||
HOWTO (name, 0, 1, 16, FALSE, 0, complain_overflow_bitfield, \
|
||||
bfd_elf_generic_reloc, #name, FALSE, 0, 0xffff, FALSE)
|
||||
|
||||
TLSHOWTO32 (R_CRIS_32_GOT_GD),
|
||||
TLSHOWTO16 (R_CRIS_16_GOT_GD),
|
||||
TLSHOWTO32 (R_CRIS_32_GD),
|
||||
TLSHOWTO32 (R_CRIS_DTP),
|
||||
TLSHOWTO32 (R_CRIS_32_DTPREL),
|
||||
TLSHOWTO16 (R_CRIS_16_DTPREL),
|
||||
TLSHOWTO32 (R_CRIS_32_GOT_TPREL),
|
||||
TLSHOWTO16 (R_CRIS_16_GOT_TPREL),
|
||||
TLSHOWTO32 (R_CRIS_32_TPREL),
|
||||
TLSHOWTO16 (R_CRIS_16_TPREL),
|
||||
TLSHOWTO32 (R_CRIS_DTPMOD)
|
||||
};
|
||||
|
||||
/* Map BFD reloc types to CRIS ELF reloc types. */
|
||||
|
@ -441,7 +465,18 @@ static const struct cris_reloc_map cris_reloc_map [] =
|
|||
{ BFD_RELOC_CRIS_32_GOTPLT, R_CRIS_32_GOTPLT },
|
||||
{ BFD_RELOC_CRIS_32_GOTREL, R_CRIS_32_GOTREL },
|
||||
{ BFD_RELOC_CRIS_32_PLT_GOTREL, R_CRIS_32_PLT_GOTREL },
|
||||
{ BFD_RELOC_CRIS_32_PLT_PCREL, R_CRIS_32_PLT_PCREL }
|
||||
{ BFD_RELOC_CRIS_32_PLT_PCREL, R_CRIS_32_PLT_PCREL },
|
||||
{ BFD_RELOC_CRIS_32_GOT_GD, R_CRIS_32_GOT_GD },
|
||||
{ BFD_RELOC_CRIS_16_GOT_GD, R_CRIS_16_GOT_GD },
|
||||
{ BFD_RELOC_CRIS_32_GD, R_CRIS_32_GD },
|
||||
{ BFD_RELOC_CRIS_DTP, R_CRIS_DTP },
|
||||
{ BFD_RELOC_CRIS_32_DTPREL, R_CRIS_32_DTPREL },
|
||||
{ BFD_RELOC_CRIS_16_DTPREL, R_CRIS_16_DTPREL },
|
||||
{ BFD_RELOC_CRIS_32_GOT_TPREL, R_CRIS_32_GOT_TPREL },
|
||||
{ BFD_RELOC_CRIS_16_GOT_TPREL, R_CRIS_16_GOT_TPREL },
|
||||
{ BFD_RELOC_CRIS_32_TPREL, R_CRIS_32_TPREL },
|
||||
{ BFD_RELOC_CRIS_16_TPREL, R_CRIS_16_TPREL },
|
||||
{ BFD_RELOC_CRIS_DTPMOD, R_CRIS_DTPMOD }
|
||||
};
|
||||
|
||||
static reloc_howto_type *
|
||||
|
|
11
bfd/libbfd.h
11
bfd/libbfd.h
|
@ -1890,6 +1890,17 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
|
|||
"BFD_RELOC_CRIS_32_GOTREL",
|
||||
"BFD_RELOC_CRIS_32_PLT_GOTREL",
|
||||
"BFD_RELOC_CRIS_32_PLT_PCREL",
|
||||
"BFD_RELOC_CRIS_32_GOT_GD",
|
||||
"BFD_RELOC_CRIS_16_GOT_GD",
|
||||
"BFD_RELOC_CRIS_32_GD",
|
||||
"BFD_RELOC_CRIS_DTP",
|
||||
"BFD_RELOC_CRIS_32_DTPREL",
|
||||
"BFD_RELOC_CRIS_16_DTPREL",
|
||||
"BFD_RELOC_CRIS_32_GOT_TPREL",
|
||||
"BFD_RELOC_CRIS_16_GOT_TPREL",
|
||||
"BFD_RELOC_CRIS_32_TPREL",
|
||||
"BFD_RELOC_CRIS_16_TPREL",
|
||||
"BFD_RELOC_CRIS_DTPMOD",
|
||||
"BFD_RELOC_860_COPY",
|
||||
"BFD_RELOC_860_GLOB_DAT",
|
||||
"BFD_RELOC_860_JUMP_SLOT",
|
||||
|
|
25
bfd/reloc.c
25
bfd/reloc.c
|
@ -4718,6 +4718,31 @@ ENUM
|
|||
ENUMDOC
|
||||
32-bit offset to symbol with PLT entry, relative to this relocation.
|
||||
|
||||
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
|
||||
ENUMDOC
|
||||
Relocs used in TLS code for CRIS.
|
||||
|
||||
ENUM
|
||||
BFD_RELOC_860_COPY
|
||||
ENUMX
|
||||
|
|
Loading…
Reference in a new issue