From: DJ Delorie Date: Fri, 20 Dec 2002 21:13:19 +0000 (+0000) Subject: * reloc.c: Add BFD_RELOC_XSTORMY16_12. X-Git-Tag: cagney-unwind-20030108-branchpoint~251 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5fd63999813544012111697f77f3b4c87b91a1a8;p=external%2Fbinutils.git * reloc.c: Add BFD_RELOC_XSTORMY16_12. * libbfd.h: Regenerate. * bfd-in2.h: Regenerate. * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_12. (xstormy16_reloc_map): Add R_XSTORMY16_12. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index fbe88d0..75dd844 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,11 @@ +2002-12-20 DJ Delorie + + * reloc.c: Add BFD_RELOC_XSTORMY16_12. + * libbfd.h: Regenerate. + * bfd-in2.h: Regenerate. + * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_12. + (xstormy16_reloc_map): Add R_XSTORMY16_12. + 2002-12-19 Kazu Hirata * doc/bfdint.texi: Fix typos. diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index 60b7b51..d010632 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -3237,6 +3237,7 @@ to follow the 16K memory bank of 68HC12 (seen as mapped in the window). */ /* Sony Xstormy16 Relocations. */ BFD_RELOC_XSTORMY16_REL_12, + BFD_RELOC_XSTORMY16_12, BFD_RELOC_XSTORMY16_24, BFD_RELOC_XSTORMY16_FPTR16, diff --git a/bfd/elf32-xstormy16.c b/bfd/elf32-xstormy16.c index 4f91e08..df0d7ca 100644 --- a/bfd/elf32-xstormy16.c +++ b/bfd/elf32-xstormy16.c @@ -238,6 +238,21 @@ static reloc_howto_type xstormy16_elf_howto_table [] = 0, /* src_mask */ 0xffff, /* dst_mask */ FALSE), /* pcrel_offset */ + + /* A 12 bit absolute relocation. */ + HOWTO (R_XSTORMY16_12, /* type */ + 0, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 12, /* bitsize */ + FALSE, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_signed, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_XSTORMY16_12", /* name */ + FALSE, /* partial_inplace */ + 0x0000, /* src_mask */ + 0x0fff, /* dst_mask */ + FALSE), /* pcrel_offset */ }; static reloc_howto_type xstormy16_elf_howto_table2 [] = @@ -297,6 +312,7 @@ static const reloc_map xstormy16_reloc_map [] = { 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_XSTORMY16_12, R_XSTORMY16_12, 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 }, }; @@ -332,7 +348,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_HI16) + if (r_type <= (unsigned int) R_XSTORMY16_12) cache_ptr->howto = &xstormy16_elf_howto_table [r_type]; else if (r_type - R_XSTORMY16_GNU_VTINHERIT <= (unsigned int) R_XSTORMY16_GNU_VTENTRY) diff --git a/bfd/libbfd.h b/bfd/libbfd.h index 540b233..8f3cf58 100644 --- a/bfd/libbfd.h +++ b/bfd/libbfd.h @@ -1367,6 +1367,7 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_H8_DIR24R8", "BFD_RELOC_H8_DIR32A16", "BFD_RELOC_XSTORMY16_REL_12", + "BFD_RELOC_XSTORMY16_12", "BFD_RELOC_XSTORMY16_24", "BFD_RELOC_XSTORMY16_FPTR16", "BFD_RELOC_VAX_GLOB_DAT", diff --git a/bfd/reloc.c b/bfd/reloc.c index 7111613..23224f3 100644 --- a/bfd/reloc.c +++ b/bfd/reloc.c @@ -3597,6 +3597,8 @@ ENUMDOC ENUM BFD_RELOC_XSTORMY16_REL_12 ENUMX + BFD_RELOC_XSTORMY16_12 +ENUMX BFD_RELOC_XSTORMY16_24 ENUMX BFD_RELOC_XSTORMY16_FPTR16