aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-xstormy16.c
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2002-12-17 03:54:15 +0000
committerDJ Delorie <dj@redhat.com>2002-12-17 03:54:15 +0000
commit46f2b5418fa033d9a9e1d8ceb1ff8e673c1addc3 (patch)
tree47f74964ccceb354869c8023baa4d04e19cb8eb7 /bfd/elf32-xstormy16.c
parent9b700aad366dceee82141afc69b6ee69802b90c9 (diff)
downloadgdb-46f2b5418fa033d9a9e1d8ceb1ff8e673c1addc3.zip
gdb-46f2b5418fa033d9a9e1d8ceb1ff8e673c1addc3.tar.gz
gdb-46f2b5418fa033d9a9e1d8ceb1ff8e673c1addc3.tar.bz2
* 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 a729514..4f91e08 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)