diff options
author | Nick Clifton <nickc@redhat.com> | 1999-08-20 07:56:08 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 1999-08-20 07:56:08 +0000 |
commit | 47823ab27b5e5b4cc85ca182f93ebd7f110374ea (patch) | |
tree | 0ac2a8456fe3d94b038c091bedda0ef2c37f9a15 /bfd/elf32-arm.h | |
parent | 4f5979c454b7dbdacad851bc3c0409da014d3da6 (diff) | |
download | gdb-47823ab27b5e5b4cc85ca182f93ebd7f110374ea.tar.gz |
fix bug in previous delta
Diffstat (limited to 'bfd/elf32-arm.h')
-rw-r--r-- | bfd/elf32-arm.h | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/bfd/elf32-arm.h b/bfd/elf32-arm.h index 0dc397bd9dc..fe7fa82cb88 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); |