From: DJ Delorie Date: Tue, 17 Dec 2002 03:54:15 +0000 (+0000) Subject: * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_LO16 X-Git-Tag: cagney-unwind-20030108-branchpoint~309 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=46f2b5418fa033d9a9e1d8ceb1ff8e673c1addc3;p=platform%2Fupstream%2Fbinutils.git * 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. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index caf4d04..1ac7d7b 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,11 @@ +2002-12-16 Andrew MacLeod + + * 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. + 2002-12-16 Nathan Tallent * ecofflink.c: Fix the reading of the debugging information 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)