aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bfd/ChangeLog8
-rw-r--r--bfd/bfd-in2.h9
-rw-r--r--bfd/elf32-v850.c52
-rw-r--r--bfd/libbfd.h3
-rw-r--r--bfd/reloc.c12
5 files changed, 84 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 29f8ff9..0cb700a 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -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.
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index 4767c0c..220ed5b 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -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 };
diff --git a/bfd/elf32-v850.c b/bfd/elf32-v850.c
index 1640375..f4c22ee 100644
--- a/bfd/elf32-v850.c
+++ b/bfd/elf32-v850.c
@@ -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 *
diff --git a/bfd/libbfd.h b/bfd/libbfd.h
index 02d1279..aa3dd61 100644
--- a/bfd/libbfd.h
+++ b/bfd/libbfd.h
@@ -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@@",
diff --git a/bfd/reloc.c b/bfd/reloc.c
index cf0674a..20be20d 100644
--- a/bfd/reloc.c
+++ b/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 *}