From: Nick Clifton Date: Fri, 20 Aug 1999 07:56:08 +0000 (+0000) Subject: fix bug in previous delta X-Git-Tag: gdb-1999-08-23~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ddda4409ceacecadef5f33c10b6719a04348b514;p=platform%2Fupstream%2Fbinutils.git fix bug in previous delta --- 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);