diff options
author | M R Swami Reddy <MR.Swami.Reddy@nsc.com> | 2009-07-27 06:52:33 +0000 |
---|---|---|
committer | M R Swami Reddy <MR.Swami.Reddy@nsc.com> | 2009-07-27 06:52:33 +0000 |
commit | 86514226a5438800f5ad6df6959d530395e8e5df (patch) | |
tree | cdd32f44491899292303b832a951236d80b72ca3 /bfd/elf32-cr16.c | |
parent | 305f7588d685d1e6a8f9d6577077bcfff0ca3d6b (diff) | |
download | gdb-86514226a5438800f5ad6df6959d530395e8e5df.zip gdb-86514226a5438800f5ad6df6959d530395e8e5df.tar.gz gdb-86514226a5438800f5ad6df6959d530395e8e5df.tar.bz2 |
2009-07-26 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
* elf32-cr16.c (elf_cr16_final_link_relocate): Add code to handle
to R_cr16_NUM32 relocation.
Diffstat (limited to 'bfd/elf32-cr16.c')
-rw-r--r-- | bfd/elf32-cr16.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/bfd/elf32-cr16.c b/bfd/elf32-cr16.c index 795590c..085c671 100644 --- a/bfd/elf32-cr16.c +++ b/bfd/elf32-cr16.c @@ -1259,6 +1259,21 @@ cr16_elf_final_link_relocate (reloc_howto_type *howto, | (bfd_get_32 (input_bfd, hit_data) & 0xf0ff)); } + else if (r_type == R_CR16_NUM32) + { + Rvalue1 = (bfd_get_32 (input_bfd, hit_data)); + + /* Add or subtract the offset value */ + if (Rvalue1 & 0x80000000) + Rvalue -= (~Rvalue1 + 1) & 0xffffffff; + else + Rvalue += Rvalue1; + + /* Check for Ranga */ + if (Rvalue > 0xffffffff) + return bfd_reloc_overflow; + } + bfd_put_32 (input_bfd, Rvalue, hit_data); } break; |