aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-arm.h
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>1999-08-20 07:56:08 +0000
committerNick Clifton <nickc@redhat.com>1999-08-20 07:56:08 +0000
commitddda4409ceacecadef5f33c10b6719a04348b514 (patch)
tree5a358d07659cee52fee54e89bed0266f00a9dd30 /bfd/elf32-arm.h
parentaff05906d21b6db722b9535e54be1d61b96da0ae (diff)
downloadgdb-ddda4409ceacecadef5f33c10b6719a04348b514.zip
gdb-ddda4409ceacecadef5f33c10b6719a04348b514.tar.gz
gdb-ddda4409ceacecadef5f33c10b6719a04348b514.tar.bz2
fix bug in previous delta
Diffstat (limited to 'bfd/elf32-arm.h')
-rw-r--r--bfd/elf32-arm.h20
1 files changed, 15 insertions, 5 deletions
diff --git a/bfd/elf32-arm.h b/bfd/elf32-arm.h
index 0dc397b..fe7fa82 100644
--- a/bfd/elf32-arm.h
+++ b/bfd/elf32-arm.h
@@ -1607,13 +1607,23 @@ arm_add_to_rel (abfd, address, howto, increment)
}
/* Add in the increment, (which is a byte value). */
- addend <<= howto->size;
- addend += increment;
+ switch (howto->type)
+ {
+ case R_ARM_THM_PC22:
+ default:
+ addend += increment;
+ break;
- /* Should we check for overflow here ? */
+ case R_ARM_PC24:
+ addend <<= howto->size;
+ addend += increment;
+
+ /* Should we check for overflow here ? */
- /* Drop any undesired bits. */
- addend >>= howto->rightshift;
+ /* Drop any undesired bits. */
+ addend >>= howto->rightshift;
+ break;
+ }
contents = (contents & ~ howto->dst_mask) | (addend & howto->dst_mask);