mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-22 07:53:36 +08:00
* elf32-v850.c (enum reloc_type): Add R_V850_SDA_OFFSET,
R_V850_TDA_OFFSET and R_V850_ZDA_OFFSET. (elf_v850_howto_table): Corresponding changes. (elf_v850_reloc_map): Corresponding changes. * reloc.c: Add additional V850 relocations. * bfd-in2.h, libbfd.h: Rebuilt.
This commit is contained in:
parent
148b365e90
commit
b6d08fce22
@ -6,6 +6,14 @@ Wed Oct 16 11:24:35 1996 Jeffrey A Law (law@cygnus.com)
|
||||
which are being discarded.
|
||||
|
||||
start-sanitize-v850
|
||||
|
||||
* elf32-v850.c (enum reloc_type): Add R_V850_SDA_OFFSET,
|
||||
R_V850_TDA_OFFSET and R_V850_ZDA_OFFSET.
|
||||
(elf_v850_howto_table): Corresponding changes.
|
||||
(elf_v850_reloc_map): Corresponding changes.
|
||||
* reloc.c: Add additional V850 relocations.
|
||||
* bfd-in2.h, libbfd.h: Rebuilt.
|
||||
|
||||
* elf32-v850.c (bfd_elf32_v850_reloc): Mask out bits we
|
||||
no longer want in pc-relative relocs.
|
||||
|
||||
|
@ -1864,6 +1864,15 @@ This is a 24 bit address. */
|
||||
|
||||
/* This is a 22-bit reloc */
|
||||
BFD_RELOC_V850_22_PCREL,
|
||||
|
||||
/* This is an offset from the short data area pointer.. */
|
||||
BFD_RELOC_V850_SDA_OFFSET,
|
||||
|
||||
/* This is an offset from the zero data area pointer.. */
|
||||
BFD_RELOC_V850_ZDA_OFFSET,
|
||||
|
||||
/* This is an offset from the tiny data area pointer.. */
|
||||
BFD_RELOC_V850_TDA_OFFSET,
|
||||
/* end-sanitize-v850 */
|
||||
|
||||
BFD_RELOC_UNUSED };
|
||||
|
@ -46,6 +46,9 @@ enum reloc_type
|
||||
R_V850_32,
|
||||
R_V850_16,
|
||||
R_V850_8,
|
||||
R_V850_SDA_OFFSET,
|
||||
R_V850_ZDA_OFFSET,
|
||||
R_V850_TDA_OFFSET,
|
||||
R_V850_max
|
||||
};
|
||||
|
||||
@ -185,6 +188,52 @@ static reloc_howto_type elf_v850_howto_table[] =
|
||||
0xff, /* src_mask */
|
||||
0xff, /* dst_mask */
|
||||
false), /* pcrel_offset */
|
||||
|
||||
/* Offset from the short data area pointer. */
|
||||
HOWTO (R_V850_SDA_OFFSET, /* type */
|
||||
0, /* rightshift */
|
||||
1, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
16, /* bitsize */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_dont,/* complain_on_overflow */
|
||||
bfd_elf_generic_reloc, /* special_function */
|
||||
"R_V850_SDA_OFFSET", /* name */
|
||||
true, /* partial_inplace */
|
||||
0xffff, /* src_mask */
|
||||
0xffff, /* dst_mask */
|
||||
false), /* pcrel_offset */
|
||||
|
||||
/* Offset from the tiny data area pointer. */
|
||||
HOWTO (R_V850_TDA_OFFSET, /* type */
|
||||
0, /* rightshift */
|
||||
1, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
16, /* bitsize */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_dont,/* complain_on_overflow */
|
||||
bfd_elf_generic_reloc, /* special_function */
|
||||
"R_V850_TDA_OFFSET", /* name */
|
||||
true, /* partial_inplace */
|
||||
0xffff, /* src_mask */
|
||||
0xffff, /* dst_mask */
|
||||
false), /* pcrel_offset */
|
||||
|
||||
/* Offset from the zero data area pointer. */
|
||||
HOWTO (R_V850_ZDA_OFFSET, /* type */
|
||||
0, /* rightshift */
|
||||
1, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
16, /* bitsize */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_dont,/* complain_on_overflow */
|
||||
bfd_elf_generic_reloc, /* special_function */
|
||||
"R_V850_ZDA_OFFSET", /* name */
|
||||
true, /* partial_inplace */
|
||||
0xffff, /* src_mask */
|
||||
0xffff, /* dst_mask */
|
||||
false), /* pcrel_offset */
|
||||
|
||||
};
|
||||
|
||||
/* Map BFD reloc types to V850 ELF reloc types. */
|
||||
@ -206,6 +255,9 @@ static const struct v850_reloc_map v850_reloc_map[] =
|
||||
{ BFD_RELOC_32, R_V850_32, },
|
||||
{ BFD_RELOC_16, R_V850_16, },
|
||||
{ BFD_RELOC_8, R_V850_8, },
|
||||
{ BFD_RELOC_V850_TDA_OFFSET, R_V850_TDA_OFFSET, },
|
||||
{ BFD_RELOC_V850_SDA_OFFSET, R_V850_SDA_OFFSET, },
|
||||
{ BFD_RELOC_V850_ZDA_OFFSET, R_V850_ZDA_OFFSET, },
|
||||
};
|
||||
|
||||
static reloc_howto_type *
|
||||
|
@ -756,6 +756,9 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
|
||||
/* start-sanitize-v850 */
|
||||
"BFD_RELOC_V850_9_PCREL",
|
||||
"BFD_RELOC_V850_22_PCREL",
|
||||
"BFD_RELOC_V850_SDA_OFFSET",
|
||||
"BFD_RELOC_V850_ZDA_OFFSET",
|
||||
"BFD_RELOC_V850_TDA_OFFSET",
|
||||
/* end-sanitize-v850 */
|
||||
|
||||
"@@overflow: BFD_RELOC_UNUSED@@",
|
||||
|
12
bfd/reloc.c
12
bfd/reloc.c
@ -2281,6 +2281,18 @@ ENUM
|
||||
BFD_RELOC_V850_22_PCREL
|
||||
ENUMDOC
|
||||
This is a 22-bit reloc
|
||||
ENUM
|
||||
BFD_RELOC_V850_SDA_OFFSET
|
||||
ENUMDOC
|
||||
This is an offset from the short data area pointer..
|
||||
ENUM
|
||||
BFD_RELOC_V850_ZDA_OFFSET
|
||||
ENUMDOC
|
||||
This is an offset from the zero data area pointer..
|
||||
ENUM
|
||||
BFD_RELOC_V850_TDA_OFFSET
|
||||
ENUMDOC
|
||||
This is an offset from the tiny data area pointer..
|
||||
COMMENT
|
||||
{* end-sanitize-v850 *}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user