summaryrefslogtreecommitdiff
path: root/bfd/elf32-xstormy16.c
diff options
context:
space:
mode:
authorDJ Delorie <dj@delorie.com>2002-12-17 03:54:15 +0000
committerDJ Delorie <dj@delorie.com>2002-12-17 03:54:15 +0000
commit6369e2c8abeb1da61e659d885e99f4019fbe470a (patch)
tree688e36632cc39a0bc7266c8428e549209a7ec617 /bfd/elf32-xstormy16.c
parentf6abfc7ee610931bc5501c53192017baf3400323 (diff)
downloadbinutils-redhat-6369e2c8abeb1da61e659d885e99f4019fbe470a.tar.gz
* elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_LO16
and R_XSTORMY16_HI16) howto entries. (xstormy16_reloc_map): Map R_XSTORMY16_{LO,HI}16 to BFD_RELOC_{LO,HI}16. (xstormy16_info_to_howto_rela): Use R_XSTORMY16_GNU_VTINHERIT to determine the start of the second reloc table.
Diffstat (limited to 'bfd/elf32-xstormy16.c')
-rw-r--r--bfd/elf32-xstormy16.c34
1 files changed, 33 insertions, 1 deletions
diff --git a/bfd/elf32-xstormy16.c b/bfd/elf32-xstormy16.c
index a729514b5e..4f91e08faf 100644
--- a/bfd/elf32-xstormy16.c
+++ b/bfd/elf32-xstormy16.c
@@ -208,6 +208,36 @@ static reloc_howto_type xstormy16_elf_howto_table [] =
0, /* src_mask */
0xffffffff, /* dst_mask */
FALSE), /* pcrel_offset */
+
+ /* Low order 16 bit value of a high memory address. */
+ HOWTO (R_XSTORMY16_LO16, /* 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_XSTORMY16_LO16", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* High order 16 bit value of a high memory address. */
+ HOWTO (R_XSTORMY16_HI16, /* type */
+ 16, /* 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_XSTORMY16_HI16", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
};
static reloc_howto_type xstormy16_elf_howto_table2 [] =
@@ -265,6 +295,8 @@ static const reloc_map xstormy16_reloc_map [] =
{ BFD_RELOC_XSTORMY16_REL_12, R_XSTORMY16_REL_12, xstormy16_elf_howto_table },
{ BFD_RELOC_XSTORMY16_24, R_XSTORMY16_24, xstormy16_elf_howto_table },
{ BFD_RELOC_XSTORMY16_FPTR16, R_XSTORMY16_FPTR16, xstormy16_elf_howto_table },
+ { BFD_RELOC_LO16, R_XSTORMY16_LO16, xstormy16_elf_howto_table },
+ { BFD_RELOC_HI16, R_XSTORMY16_HI16, xstormy16_elf_howto_table },
{ BFD_RELOC_VTABLE_INHERIT, R_XSTORMY16_GNU_VTINHERIT, xstormy16_elf_howto_table2 },
{ BFD_RELOC_VTABLE_ENTRY, R_XSTORMY16_GNU_VTENTRY, xstormy16_elf_howto_table2 },
};
@@ -300,7 +332,7 @@ xstormy16_info_to_howto_rela (abfd, cache_ptr, dst)
{
unsigned int r_type = ELF32_R_TYPE (dst->r_info);
- if (r_type <= (unsigned int) R_XSTORMY16_FPTR16)
+ if (r_type <= (unsigned int) R_XSTORMY16_HI16)
cache_ptr->howto = &xstormy16_elf_howto_table [r_type];
else if (r_type - R_XSTORMY16_GNU_VTINHERIT
<= (unsigned int) R_XSTORMY16_GNU_VTENTRY)