~ubuntu-branches/debian/squeeze/binutils/squeeze

« back to all changes in this revision

Viewing changes to bfd/elf32-cr16.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2009-09-10 17:05:30 UTC
  • mfrom: (1.4.5 upstream) (6.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20090910170530-wa6gpju9pq5c56on
Tags: 2.19.91.20090910-1
* Snapshot, taken from the 2.20 release branch 20090910, corresponding
  to the 2.19.90 upstream snapshot.
* Fix Thumb-2 shared libraries (Daniel Jacobowitz), patch taken
  from the trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* BFD back-end for National Semiconductor's CR16 ELF
2
 
   Copyright 2007 Free Software Foundation, Inc.
 
2
   Copyright 2007, 2008, 2009 Free Software Foundation, Inc.
3
3
   Written by M R Swami Reddy.
4
4
 
5
5
   This file is part of BFD, the Binary File Descriptor library.
1259
1259
                            | (bfd_get_32 (input_bfd, hit_data) & 0xf0ff));
1260
1260
 
1261
1261
              }
 
1262
            else if (r_type == R_CR16_NUM32)
 
1263
              {
 
1264
                 Rvalue1 = (bfd_get_32 (input_bfd, hit_data)); 
 
1265
 
 
1266
                 /* Add or subtract the offset value */
 
1267
                 if (Rvalue1 & 0x80000000)
 
1268
                   Rvalue -= (~Rvalue1 + 1) & 0xffffffff;
 
1269
                 else
 
1270
                   Rvalue += Rvalue1;
 
1271
 
 
1272
                /* Check for Ranga */
 
1273
                if (Rvalue > 0xffffffff)
 
1274
                  return bfd_reloc_overflow;
 
1275
              }
 
1276
 
1262
1277
            bfd_put_32 (input_bfd, Rvalue, hit_data);
1263
1278
          }
1264
1279
        break;