diff options
author | Nick Clifton <nickc@redhat.com> | 2015-03-06 09:46:15 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2015-03-06 09:46:15 +0000 |
commit | 65164438aaf163aee0de40bcfab87dfd58f47b6b (patch) | |
tree | 8fc8b95aa7e47f619d2d0146fb0daaae801b42cb /bfd/elflink.c | |
parent | 61012eef8463764ccd9117dc1c9bc43cc452b7cc (diff) | |
download | gdb-65164438aaf163aee0de40bcfab87dfd58f47b6b.zip gdb-65164438aaf163aee0de40bcfab87dfd58f47b6b.tar.gz gdb-65164438aaf163aee0de40bcfab87dfd58f47b6b.tar.bz2 |
Fix an undefined 32-bit right shift by replacing it with two 16-bit right shifts.
PR binutils/17765
* elflink.c (put_value): Like previous delta, but for the 32-bit
case.
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r-- | bfd/elflink.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c index b285e76..f93293b 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -7807,7 +7807,9 @@ put_value (bfd_vma size, break; case 4: bfd_put_32 (input_bfd, x, location); - x >>= 32; + /* Computed this way because x >>= 32 is undefined if x is a 32-bit value. */ + x >>= 16; + x >>= 16; break; #ifdef BFD64 case 8: |